Jump to content

Running a script for a limited time and then quiting


Recommended Posts

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?

Link to comment
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!

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...