Class Thread
{
__New(RunLabelOrFunc)
{
args:= “/Run=” RunLabelOrFunc
if (A_IsCompiled)
Run, “%A_ScriptFullPath%” /f “%args%”,,, pid
else
Run, “%A_AhkPath%” /f “%A_ScriptFullPath%” “%args%”,,, pid
this.pid:=pid
}
__Delete()
{
Process, Close, % this.pid
}
ScriptStart()
{
static init:=Thread.ScriptStart()
#NoEnv
#NoTrayIcon
if !InStr(A_Args[1], “/Run=”)
{
Menu, Tray, Icon
return
}
Suspend, On
if IsLabel(k:=SubStr(A_Args[1], 6))
Gosub, %k%
else if IsFunc(k)
%k%()
ExitApp
}
}
使用了飞跃大大的多线程函数导致了suspend无法挂起
比喻
*F2::
aaa2:=(onoff:=!onoff) ? new Thread(“a2”) : “”
return
a2:
return
a::
return
b::
suspend
当f2线程开启之后用suspend就无法挂起a的命令😟
请问有解救的方法吗