Jump to content
Sign in to follow this  

How to close AutoIT script automatically after it hangs for 1 hour?

Recommended Posts


I currently have a AutoIT script that installs a Firefox plugin. Sometimes my AutoIT script hangs, due to bad builds of the Firefox plugin.

Because I have the entire process automated, and it runs overnight. Sometimes, the AutoIT script will hang all night until I notice it in the morning.

I was wondering if there was any possible way to have the AutoIT script just close itself out after a certain period of time?


Share this post

Link to post
Share on other sites

Hi there,

Try AdlibRegister.

Cheers and welcome aboard

Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Share this post

Link to post
Share on other sites

Does it hang because it crashes from some error, or does the execution take too long, or something else?

If execution is too long, then adlib...() will work.  If your script blows up, it won't.

There are additional levels of abstraction, but I'd execute the script via another script, and if the process takes longer than X amount of time, kill the process.

This works for if the script is stuck in some loop, or if the script blows up during execution:

$iTimer = TimerInit()
$iMax = 1000*60*60 ; 1 hour
$iPID = Run("YourCompiledAU3.exe /ErrorStdOut your paramms go here")
While ProcessExists($iPID) And TimerDiff($iTimer) < $iMax

If ProcessExists($iPID) Then
    Exit 1
    Exit 0
Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

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  

  • Create New...