多年来,我一直以非常简单的形式使用 AHK,但多次尝试学习更高级的功能只会导致困惑和沮丧。
目前,我正在尝试创建一个脚本,当我按住波浪号键并在 Google Chrome 窗口内单击鼠标左键时,该脚本会将热键“CTRL + W”发送到 Google Chrome。每当我触发脚本时,它似乎会关闭每个选项卡,然后关闭浏览器本身。
我的脚本如下 - 我做错了什么?
#IfWinActive ahk_class Chrome_WidgetWin_1 ;Checks that the active window is Google Chrome.
` & LButton:: ;Tilde + Left Mouse Button
Send, ^+w ;Sends CTRL + W to the window.
return ;Ends the script.