jgus 0 Posted October 13, 2004 Is their a way that the script can be told to just give up(quit) if a certain amount of time goes by? I would just like to make sure the script doesn't hang up on the users PC with a splash screen and then the user will have to call us to kill the script. It would be nice if the script could know to kill itself if it is taking too long. Share this post Link to post Share on other sites
this-is-me 6 Posted October 13, 2004 Do not double post. The answer to your first question was answered in the first post. You do not need this functionality if you read the helpfile and understood it the first time. Read the other post. Who else would I be? Share this post Link to post Share on other sites
jgus 0 Posted October 13, 2004 This was not the same question as my other post. I just wonder if there is a way to have the script stop if it isn't finished in a certain amount of time. Share this post Link to post Share on other sites
MHz 80 Posted October 13, 2004 Timeouts are in most winwait related functions and messageboxes, so they will allow the script to continue. The script may fail it's objective but it may finish. depending on the way that you code it. You can add more if..else..endif and so on, with may make your script a safer script. Share this post Link to post Share on other sites
JSThePatriot 18 Posted October 13, 2004 Also as a quick reply... check the help file for TimerInit() and TimerDiff(). JS AutoIt LinksFile-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.ComputerGetInfo UDF's Updated! 11-23-2006External LinksVortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Share this post Link to post Share on other sites
scriptkitty 1 Posted October 13, 2004 Also you can use a global timer with adlib. Set adlib to quit after a certain TimerDiff You can reset the timer as you go along as well. ex: adlibenable("myadlib") $begin = TimerInit() MsgBox(1,"Info","you have 3 sec to continue") $begin = TimerInit(); reset timer while 1 tooltip(int(TimerDiff($begin)/1000),0,0) sleep(10); stuck wend Func myadlib() If TimerDiff($begin)>3000 Then MsgBox(0,"Error","Time limit exceded!") exit EndIf endfunc AutoIt3, the MACGYVER Pocket Knife for computers. Share this post Link to post Share on other sites