Ferret Posted August 29, 2006 Share Posted August 29, 2006 But we see with our AutoIT scripts that the error level only exists in an extra shell environment that is spawned, and doesn't survive back in the shell environment where it was kicked off.Grumble, groan, moan, complain, agitate... Yup. This is one of those cases where, annoying as it is, I think having the discussion in the forum will resolve the issue for others in the future and maybe allow the developers to fix it in a future release. BUT, I'm still embarrassed that I didn't figure it out on my own. Murphy lives here.My website, if you care: HIPAA Information Security Resources Link to comment Share on other sites More sharing options...
Valik Posted August 29, 2006 Share Posted August 29, 2006 Actually, the answer is rather obvious now that I think about it. AutoIt is not a console application. The console does not wait for AutoIt to close so it can't set %ERRORLEVEL% to what AutoIt returns because it doesn't wait for AutoIt to return. Meanwhile, a batch file does wait for AutoIt to close and so it does allow %ERRORLEVEL% to be set. I suspect no Windows application will set %ERRORLEVEL%. That also means there is nothing to fix in AutoIt because nothing is broken in AutoIt. Link to comment Share on other sites More sharing options...
Developers Jos Posted August 29, 2006 Developers Share Posted August 29, 2006 Actually, the answer is rather obvious now that I think about it. AutoIt is not a console application. The console does not wait for AutoIt to close so it can't set %ERRORLEVEL% to what AutoIt returns because it doesn't wait for AutoIt to return. Meanwhile, a batch file does wait for AutoIt to close and so it does allow %ERRORLEVEL% to be set. I suspect no Windows application will set %ERRORLEVEL%. That also means there is nothing to fix in AutoIt because nothing is broken in AutoIt. You are correct... its easily proven by doing the below commands from the command line. Start /wait will wait till the autoit3 script finishes. start /wait test Echo %ERRORLEVEL% SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. 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