AUTOHOTKEY:挂起后的脚本不想取消挂起

时间:2021-08-01 22:59:11

标签: label autohotkey suspend

我的代码有问题: 当我单击 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

0 个答案:

没有答案