timmalos Posted July 17, 2012 Share Posted July 17, 2012 Hi everyone. I got a scheduler in AutoIt who launch some scripts which don't have any GUI but do some actions with IE.au3 or FF.au3 Here's my function : Func _Lancerappli() Local $i For $i = 1 To $nbScenarios If Eval("scenario" & $i & "_isStarted") And (Number(Eval("scenario" & $i & "_TimeBeforeExecute")) <= 0) Then SplashTextOn("", "Simulation de " & Eval("scenario" & $i & "_appli") & "/" & Eval("scenario" & $i & "_name") & " en Cours", $total_width, 60, 0, $total_height - 60, 32 + 16 + 1, "", 20, 400) ShellExecuteWait($autoit, '"' & Eval("scenario" & $i & "_path") & Eval("scenario" & $i & "_name") & '.au3"') _actualiser(1) _log(" \\Scénario " & Eval("scenario" & $i & "_appli") & " // " & Eval("scenario" & $i & "_nom") & " lancé le " & Eval("scenario" & $i & "_last_date") & ". {Etat:" & Eval("scenario" & $i & "_nombreverifs") & " Nombre de Vérifications Echouées:" & Eval("scenario" & $i & "_nombreverifs0") & "}") SplashOff() EndIf Next EndFunc ;==>_Lancerappli The problem is that it can happens the script totally freeze (cause it waits for an hung Internet Explorer or an action which will never occurs). In this case my scheduler will not launch other scripts cause it is waiting with ShellExecuteWait. I want to add a timeout (like 5 minutes) and then start a 'clean' function, is it possible? Link to comment Share on other sites More sharing options...
Andreik Posted July 17, 2012 Share Posted July 17, 2012 Maybe you can register an adlib to close the process after some time (like 5 min). When the words fail... music speaks. Link to comment Share on other sites More sharing options...
timmalos Posted July 18, 2012 Author Share Posted July 18, 2012 I did that Thx man Link to comment Share on other sites More sharing options...
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