您提供的信息很少……我可以想象您可能会点击Ctrls例如在 PX_WINDOW_CLASS 中保存文件。如果当时没有激活与您的 winwait 匹配的窗口,则不会发生任何事情,AutoHotKey 将坐等等待......
建议:缩短WinWait中的超时时间,增加退出,去掉多余的行
SetTitleMatchMode=2 ; Find the string "This is an unregistered copy" anywhere in your Title
#IfWinActive, ahk_class PX_WINDOW_CLASS
~^s::
KeyWait, s, U ; Why do you have this in there? are you hanging on your s key for more than 2 seconds?
WinWait, This is an unregistered copy,,2 ; Wait for two seconds (or a bit longer..)
if ErrorLevel ; If timeout of WinWait
Return
WinKill ; uses ID found in WinWait
Return
#IfWinActive
或者更短...
SetTitleMatchMode=2
#IfWinActive, ahk_class PX_WINDOW_CLASS
~^s::
WinWait, This is an unregistered copy,,2
if not ErrorLevel
WinKill ; uses ID found in WinWait
Return
#IfWinActive