Is there a similar command in AutoIt that would be the equivalent of AutoHotKey's #persistent? I have Googled but only found a script that is somewhat suspect.
Thank you in advance for any help,
yeto
Thank you in advance for any help,
yeto
HotKeySet("{ESC}","stop")
$running = False
Func stop()
$running = False
EndFunc
Func mainLoop()
$running = True
While $running
;Your program logic here
ToolTip("script running " & @HOUR & ":" &@MIN & ":" &@SEC,0,0)
Sleep(5);add delay to prevent high CPU ussage
WEnd
EndFunc
mainLoop()
Thank you for taking time to reply. This is very helpful.Quote:
Persistent is to continue loop, you could do the same with a while loop and exit condition.
Code:HotKeySet("{ESC}","stop") $running = False Func stop() $running = False EndFunc Func mainLoop() $running = True While $running ;Your program logic here ToolTip("script running " & @HOUR & ":" &@MIN & ":" &@SEC,0,0) Sleep(5);add delay to prevent high CPU ussage WEnd EndFunc mainLoop()