使用#IfWinActive指定特定的窗口,并在每个键组合之间添加“;”来使其正常工作。代码示例如下:
#IfWinActive ahk_class Notepad ;指定特定的窗口
a & b:: MsgBox, You pressed Ctrl+Shift+A and then B. return
a & c:: MsgBox, You pressed Ctrl+Shift+A and then C. return
#IfWinActive ;取消指定窗口
上一篇:AHK-模拟Fn快捷键
下一篇:AHK-Sleepinsideafunctiondoesn'twork(2)”