小编Shl*_*uch的帖子

Autohotkeys 无法识别 Google Chrome Windows。我能做什么?

我正在自动热键中创建一个热键,以激活 Google Chrome,或在所有 Chrome 窗口之间移动。

热键是Win+ H(h 表示 http)。

如果用户按下Win+ Shift+H它会打开一个新的 chrome 窗口

如果用户按Win+H两次,它将在所有 chrome 窗口之间移动:

更新:请参阅底部的完整脚本。谢谢大家:

问题是 AutoHotKeys 找不到 chrome 的类,所以它总是打开新窗口:

此函数始终返回 false: If WinExist ahk_class Chrome_WidgetWin_1

请指教。

脚本文件:

#h::
SetTitleMatchMode, 2
If WinExist ahk_class Chrome_WidgetWin_1
{
ifWinActive
WinActivatebottom ,Chrome_WidgetWin_1
else
WinActivate 
return
}
run chrome.exe
Run Code Online (Sandbox Code Playgroud)

我发现了这个错误。

此版本的 AutoHotkeys 和 Google Chrome 中的 ifWinExist 函数存在错误。用户可以使用;

WinActivate ahk_class Chrome_WidgetWin_1
Run Code Online (Sandbox Code Playgroud)

但不能使用:

If WinExist ahk_class Chrome_WidgetWin_1
Run Code Online (Sandbox Code Playgroud)

永远是假的!

希望这个问答对某人有帮助(我不能写答案,因为我只有 1 …

google-chrome shortcuts autohotkey

5
推荐指数
1
解决办法
5264
查看次数

标签 统计

autohotkey ×1

google-chrome ×1

shortcuts ×1