brookemoskalev Posted September 30, 2008 Share Posted September 30, 2008 (edited) trying to terminate a script after 10 minutes, any ideas, i've looked everywhere... =( would it look something like this? HotKeySet("{ESC}", "Terminate") $begin = TimerInit() $dif = TimerDiff($begin) While 1 ... If ... ElseIf ... Endif $dif = 600000 WEnd I'm a little confused Edited September 30, 2008 by brookemoskalev Link to comment Share on other sites More sharing options...
meYasuo Posted September 30, 2008 Share Posted September 30, 2008 read the help file for timerint() timerdiff() My Mode: Link to comment Share on other sites More sharing options...
brookemoskalev Posted September 30, 2008 Author Share Posted September 30, 2008 (edited) read the help file for timerint() timerdiff()so would it look something like this? HotKeySet("{ESC}", "Terminate") $begin = TimerInit() $dif = TimerDiff($begin) While 1 ... If ... ElseIf ... Endif $dif = 600000 WEnd I'm a little confused Edited September 30, 2008 by brookemoskalev Link to comment Share on other sites More sharing options...
meYasuo Posted September 30, 2008 Share Posted September 30, 2008 did you search the forum??? there are many scripts and examples available. HotKeySet("{ESC}", "Terminate") $Timer=TimerInit() while 1 If TimerDiff($T) >= 10*1000 then ; time in mili seconds 10x1000 = 10sec GUIDelete($GUI) ;the gui which you want to del ExitLoop EndIf WEnd My Mode: Link to comment Share on other sites More sharing options...
meYasuo Posted September 30, 2008 Share Posted September 30, 2008 corrected HotKeySet("{ESC}", "Terminate") $Timer=TimerInit() while 1 If TimerDiff($Timer) >= 10*1000 then ; time in mili seconds 10x1000 = 10sec GUIDelete($GUI) ;the gui which you want to del ExitLoop EndIf If ... ElseIf... EndIf WEnd My Mode: Link to comment Share on other sites More sharing options...
Xand3r Posted September 30, 2008 Share Posted September 30, 2008 $runtime=600;in seconds $tuntime&=1000;turn into milliseconds $ExitTimer=TimerInit() While TimerDiff($ExitTimer)<$RunTime ;;do your stuff Wend GuiDelete() ;;end of the script Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro Link to comment Share on other sites More sharing options...
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