Jump to content
Sign in to follow this  
Rorka

Wait 10 mins but do other stuff inbetween?

Recommended Posts

Rorka

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

Share this post


Link to post
Share on other sites
DrKovra

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]--------------- __________------------------------------ __________---------------

Share this post


Link to post
Share on other sites
Rorka

;) YESSSS ! It is POSSIBLE ! ... ^_^

Can you tell me how?

Share this post


Link to post
Share on other sites
water

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 (2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Rorka

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

Share this post


Link to post
Share on other sites
DrKovra

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

Share this post


Link to post
Share on other sites
AlmarM

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.

Share this post


Link to post
Share on other sites
Rorka

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

Share this post


Link to post
Share on other sites
DrKovra

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]--------------- __________------------------------------ __________---------------

Share this post


Link to post
Share on other sites
Rorka

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

Share this post


Link to post
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
Sign in to follow this  

×