Jump to content

Recommended Posts

Posted

Is their a way that the script can be told to just give up(quit) if a certain amount of time goes by? I would just like to make sure the script doesn't hang up on the users PC with a splash screen and then the user will have to call us to kill the script. It would be nice if the script could know to kill itself if it is taking too long.

Posted

Do not double post. The answer to your first question was answered in the first post. You do not need this functionality if you read the helpfile and understood it the first time. Read the other post.

Who else would I be?
Posted

This was not the same question as my other post. I just wonder if there is a way to have the script stop if it isn't finished in a certain amount of time.

Posted

Timeouts are in most winwait related functions and messageboxes, so they will allow the script to continue. The script may fail it's objective but it may finish. depending on the way that you code it. You can add more if..else..endif and so on, with may make your script a safer script.

Posted

Also you can use a global timer with adlib.

Set adlib to quit after a certain TimerDiff

You can reset the timer as you go along as well.

ex:

adlibenable("myadlib")
$begin = TimerInit()

MsgBox(1,"Info","you have 3 sec to continue")
$begin = TimerInit(); reset timer

while 1
tooltip(int(TimerDiff($begin)/1000),0,0)
sleep(10); stuck
wend

Func myadlib()
If TimerDiff($begin)>3000 Then 
    MsgBox(0,"Error","Time limit exceded!")
    exit
EndIf
endfunc

AutoIt3, the MACGYVER Pocket Knife for computers.

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
  • Recently Browsing   0 members

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