Rorka Posted April 21, 2009 Share Posted April 21, 2009 Okay well I need a script to Start a timer for 10 Mins... but do something but as soon as 10 mins is up, it interrupts the script and does something else then resets timer and carries on... is this possible? Thanks Link to comment Share on other sites More sharing options...
DrKovra Posted April 21, 2009 Share Posted April 21, 2009 Okay well I need a script to Start a timer for 10 Mins... but do something but as soon as 10 mins is up, it interrupts the script and does something else then resets timer and carries on... is this possible?Thanks YESSSS ! It is POSSIBLE ! ... [s][font="Impact"]░▒▓▓►DrKovra◄▓▓▒░[/font][/s]The only thing I [sup]know [/sup]is that I don't know [sub]nothing[/sub]--------------- __________------------------------------ __________--------------- Link to comment Share on other sites More sharing options...
Rorka Posted April 21, 2009 Author Share Posted April 21, 2009 YESSSS ! It is POSSIBLE ! ... Can you tell me how? Link to comment Share on other sites More sharing options...
water Posted April 21, 2009 Share Posted April 21, 2009 Haven't done it myself but AdlibEnable could be a good place to start in the help file. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Rorka Posted April 21, 2009 Author Share Posted April 21, 2009 Haven't done it myself but AdlibEnable could be a good place to start in the help file.I dont understand how this would work Link to comment Share on other sites More sharing options...
DrKovra Posted April 21, 2009 Share Posted April 21, 2009 Want some code !? ... Take some code ! OLD SCHOOL STILE ! This is just a starting point ... you must evaluate all your possibilities first ! $Timer0 = TimerInit() While 1 _Interrupt() ;~ YOUR CODE GOES HERE WEnd Func _Interrupt() $TimeMil = TimerDiff($Timer0) If $TimeMil=10 * 60 * 1000; This is 10 minutes ... you can change the 10 to another minute value !!! ; YOUR CODE HERE --- IT'S 10 MINUTES TIME !!!!! ; ; $Timer0 = TimerInit(); RESET TIMER EndIf EndFunc [s][font="Impact"]░▒▓▓►DrKovra◄▓▓▒░[/font][/s]The only thing I [sup]know [/sup]is that I don't know [sub]nothing[/sub]--------------- __________------------------------------ __________--------------- Link to comment Share on other sites More sharing options...
AlmarM Posted April 21, 2009 Share Posted April 21, 2009 I dont understand how this would workAdlibEnable("Test", 5000) ;Activates the func "test" every 5 seconds. While 1 Sleep(1000) WEnd Func Test() MsgBox(0, "", "I was executed!") EndFunc Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
Rorka Posted April 21, 2009 Author Share Posted April 21, 2009 Want some code !? ... Take some code ! OLD SCHOOL STILE ! This is just a starting point ... you must evaluate all your possibilities first ! $Timer0 = TimerInit() While 1 _Interrupt() ;~ YOUR CODE GOES HERE WEnd Func _Interrupt() $TimeMil = TimerDiff($Timer0) If $TimeMil=10 * 60 * 1000; This is 10 minutes ... you can change the 10 to another minute value !!! ; YOUR CODE HERE --- IT'S 10 MINUTES TIME !!!!! ; ; $Timer0 = TimerInit(); RESET TIMER EndIf EndFunc Will this work if the timer goes over 10 minutes? Link to comment Share on other sites More sharing options...
DrKovra Posted April 21, 2009 Share Posted April 21, 2009 Will this work if the timer goes over 10 minutes?YES !!! This will work ... btw I made a mistake replace the line with this one:If $TimeMil>=10 * 60 * 1000 Then ; This is 10 minutes ... you can change the 10 to another minute value !!!If you want 30 minutes just use :If $TimeMil>=30 * 60 * 1000 Then ; This is 10 minutes ... you can change the 10 to another minute value !!!is you like more ... increase that value as you like ,,,, this code works well from seconds to hour .... maybe even day !!!!!! [s][font="Impact"]░▒▓▓►DrKovra◄▓▓▒░[/font][/s]The only thing I [sup]know [/sup]is that I don't know [sub]nothing[/sub]--------------- __________------------------------------ __________--------------- Link to comment Share on other sites More sharing options...
Rorka Posted April 21, 2009 Author Share Posted April 21, 2009 YES !!! This will work ... btw I made a mistake replace the line with this one:If $TimeMil>=10 * 60 * 1000 Then ; This is 10 minutes ... you can change the 10 to another minute value !!!If you want 30 minutes just use :If $TimeMil>=30 * 60 * 1000 Then ; This is 10 minutes ... you can change the 10 to another minute value !!!is you like more ... increase that value as you like ,,,, this code works well from seconds to hour .... maybe even day !!!!!! Thank you very much 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