我的代码有问题: 当我单击 F6 键 时,我的脚本暂停,当我再次单击它时,它不会取消暂停。同样在点击 t 键 和 F6 键 后,MsgBox 不起作用。
我的想法是: 如果我运行第二个标签,第一个标签不能工作,在第二个标签之后 完成,第一个标签可以工作了。
我的代码:
global abc:=true
Firstlabel:
if(abc=true){
Suspend
ToolTip % A_IsSuspended ? "Script is off" : "", 400, 0
}
else{
MsgBox,, Script, ERROR
}
Return
;```````````````````````````````````````````````````````````````````````````````````````````
Secoundlabel:
~t::
Suspend On
abc:=false
Loop
if (GetKeyState("Enter", "P") || GetKeyState("Escape", "P"))
break
Suspend Off
abc:=true
return