The_Blade Posted October 25, 2006 Share Posted October 25, 2006 Hi... I use the function : Runwait(<Myapp>) to get the exit code of <Myapp>... Good Now, if <Myapp> freeze... I can wait all the night to get my exit code... Nothing Normal... AutoIt pause the script while <Myapp> Process is not finished !! Is there a way to put a timeout with RunWait ? Is this timeout is passed, i could kill the process of <Myapp>... Why ? Because I NEED THE EXIT CODE of <Myapp> !!! Run() and other functions just return the PID... Someone can help ? Thanks !!! [u]No fate but what we make (Connor, Sarah)[/u] Link to comment Share on other sites More sharing options...
The_Blade Posted October 25, 2006 Author Share Posted October 25, 2006 Nodody Please HELP !!! [u]No fate but what we make (Connor, Sarah)[/u] Link to comment Share on other sites More sharing options...
Rad Posted October 25, 2006 Share Posted October 25, 2006 Not sure if this will help for it freezing but: RunErrorsFatal Sets if the script should terminate with a fatal error if a Run/RunWait function fails due to bad paths/file not found/Bad login IDs: 1 = fatal error (default) 0 = silent error (@error set to 1) Search RunErrorsFatal in helpfile Link to comment Share on other sites More sharing options...
The_Blade Posted October 25, 2006 Author Share Posted October 25, 2006 Not sure if this will help for it freezing but: RunErrorsFatal Sets if the script should terminate with a fatal error if a Run/RunWait function fails due to bad paths/file not found/Bad login IDs: 1 = fatal error (default) 0 = silent error (@error set to 1) Search RunErrorsFatal in helpfile I saw the RunErrorsFatal... It's only if RunWait() returns something. But in the case of looping with no end ? How to tell the script to continue its execution ? RunWait -> No response until a timeout -> Do Something (for exemple : return @error=1) It could a be a good add-on for Autoit !! No ? [u]No fate but what we make (Connor, Sarah)[/u] Link to comment Share on other sites More sharing options...
Rad Posted October 25, 2006 Share Posted October 25, 2006 You could make a seperate file to run it, and make it send back data. Use timers to count how long its taking, if it takes to long then WinKill() or processclose on it and do your error report messege Link to comment Share on other sites More sharing options...
J_Kay Posted October 25, 2006 Share Posted October 25, 2006 You might try timing how long it takes for a normal install, then add some time to it and issue a kill command. I build in a few seconds of sleep time, especially on startup scripts. Windows won't load the same speed everytime, so I build those in just in case. For example: If your program takes 30 seconds to install. Set a sleep for 60 then issue a kill or close command. It will only kill if the window exists, so you shouldn't hurt anything else. 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