Sign in to follow this  
Followers 0
netviz

Running a script for a limited time and then quiting

4 posts in this topic

Is there any way code for AutoIT that can run a script for a fixed period of time, say 30 minutes, and if the script hasn't completed by this time, exit the script?

Share this post


Link to post
Share on other sites



TimerDiff

Share this post


Link to post
Share on other sites

This would mean that I'd have to wrap every window interaction (SendKeys, WinWaits, etc) in a loop checking the time difference. Is there a simpler way to start a timer and have AutoIT automatically check this without the need for a loop?

Or would it just be easier to wrap the AutoIT script in a VBScript and have that do the checking instead?

Share this post


Link to post
Share on other sites

This would mean that I'd have to wrap every window interaction (SendKeys, WinWaits, etc) in a loop checking the time difference. Is there a simpler way to start a timer and have AutoIT automatically check this without the need for a loop?

Or would it just be easier to wrap the AutoIT script in a VBScript and have that do the checking instead?

I would go with AdlibEnable() :)

AdlibEnable("close",60*1000)

Do
    sleep(100)
Until Not "Something"

; Lots of code, blabla

Func close ()
    Exit
EndFunc

Broken link? PM me and I'll send you the file!

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  
Followers 0