adbarads Posted August 6, 2014 Posted August 6, 2014 Hi, 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? Thanks.
November Posted August 6, 2014 Posted August 6, 2014 Hi there, Try AdlibRegister. Cheers and welcome aboard WIHedgehog 1 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]
Moderators JLogan3o13 Posted August 6, 2014 Moderators Posted August 6, 2014 In addition to what November pointed out, how about posting your script along with where it hangs? Depending on the nature of the hang (simple wait vs. hard stop), how you handle it will vary. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
jdelaney Posted August 6, 2014 Posted August 6, 2014 (edited) 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 Sleep(20000) WEnd If ProcessExists($iPID) Then ProcessClose($iPID) Exit 1 Else Exit 0 EndIf Edited August 6, 2014 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now