Autohotkey #IfWinActive/#ifWinExist在ahk中未按预期工作

Autohotkey #IfWinActive/#ifWinExist在ahk中未按预期工作,autohotkey,hotkeys,Autohotkey,Hotkeys,工作如预期,但当我尝试下面的代码。。。消息框不会出现 #IfWinActive ahk_class Notepad ^!c::MsgBox You pressed Control+Alt+C in Notepad. #IfWinActive ahk_class WordPadClass ^!c::MsgBox You pressed Control+Alt+C in WordPad. #IfWinActive ^!c::MsgBox You pressed Control+Alt+C in a

工作如预期,但当我尝试下面的代码。。。消息框不会出现

#IfWinActive ahk_class Notepad
^!c::MsgBox You pressed Control+Alt+C in Notepad.
#IfWinActive ahk_class WordPadClass
^!c::MsgBox You pressed Control+Alt+C in WordPad.
#IfWinActive
^!c::MsgBox You pressed Control+Alt+C in a window other than Notepad/WordPad.

我只是不知道为什么它不起作用

对我来说起作用了。哪一部分对你不起作用?这是您的全部代码还是还有其他代码?您是否可能在虚拟桌面环境中使用此代码?我能够从Citrix桌面复制此问题。
#IfWinActive ahk_class Notepad
!c::MsgBox You pressed Alt+C in Notepad.
#IfWinActive ahk_class WordPadClass
^!c::MsgBox You pressed Control+Alt+C in WordPad.
#IfWinActive
^!c::MsgBox You pressed Control+Alt+C in a window other than Notepad/WordPad.