Sign in to follow this  
Followers 0
timmalos

ShellExecuteWait Timeout

3 posts in this topic

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?

Share this post


Link to post
Share on other sites



Maybe you can register an adlib to close the process after some time (like 5 min).


When the words fail... music speaks

Share this post


Link to post
Share on other sites

I did that ;)

Thx man

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  
Followers 0