Jump to content

Wait 10 mins but do other stuff inbetween?


 Share

Recommended Posts

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

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

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 - 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 (NEW 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

 

Link to comment
Share on other sites

;) 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

I dont understand how this would work

AdlibEnable("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

;) 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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...