Rorka Posted April 21, 2009 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
DrKovra Posted April 21, 2009 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]--------------- __________------------------------------ __________---------------
Rorka Posted April 21, 2009 Author Posted April 21, 2009 YESSSS ! It is POSSIBLE ! ... Can you tell me how?
water Posted April 21, 2009 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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Rorka Posted April 21, 2009 Author 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
DrKovra Posted April 21, 2009 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]--------------- __________------------------------------ __________---------------
AlmarM Posted April 21, 2009 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.
Rorka Posted April 21, 2009 Author 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?
DrKovra Posted April 21, 2009 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]--------------- __________------------------------------ __________---------------
Rorka Posted April 21, 2009 Author 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
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