‘壹’ 按键精灵多线程命令循环一定时间后终止
线程ID1=BeginThread(a)
线程ID2=BeginThread(b)
Dim n
n=now
Rem q
//脚本15秒后停止
Delay 1000
If DateDiff("s",n,now)>= 15 then
StopThread 线程ID1
StopThread 线程ID2
Else
Goto q
End If
Sub a
Rem q
Delay 1000
Goto q
End Sub
Sub b
Rem q
Delay 1000
Goto q
End Sub
Sub OnScriptExit()
MessageBox "脚本已经停止!"
End Sub