longxx Posted May 24, 2008 Posted May 24, 2008 I need to sleep for long time ( 300 seconds) but if something else happens I want to stop the sleep and start over again, ---what is the command to stop/break the sleeping time? and how to use it? thanks.
Developers Jos Posted May 24, 2008 Developers Posted May 24, 2008 Just create a loop with a short sleep() and the test to break the loop or restart the script. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Nahuel Posted May 24, 2008 Posted May 24, 2008 Example: HotKeySet("{esc}","togglepause") $paused=False ToolTip("Script Paused",0,0,"Test") togglepause() MsgBox(0,"","Script continues") Func togglepause() $paused=Not $paused While $paused Sleep(100) WEnd EndFunc
longxx Posted May 25, 2008 Author Posted May 25, 2008 thanks, i got around with this code: $begin = TimerInit() while 1 $dif = TimerDiff($begin) tooltip($dif,0,0) if $dif>200000 Then XXXXXXX $begin = TimerInit() EndIf sleep(100) endw
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now