Trendz Posted March 4, 2006 Share Posted March 4, 2006 Dear AutoItians, I am a newbie to AutoIT and would like your help on this: I have a Visual Basic exe that returns a value (a return code) to indicate success/failure, how do I read this return value in my script? Should I use @error? Here's the VB code of exe: Function Main() As Integer Return returnValue End Function As per Microsoft: "Other programs can test this code by examining the Windows ERRORLEVEL value" Thank you very much, Trendz Link to comment Share on other sites More sharing options...
Developers Jos Posted March 4, 2006 Developers Share Posted March 4, 2006 (edited) RunWait -------------------------------------------------------------------------------- Runs an external program and pauses script execution until the program finishes. RunWait ( "filename" [, "workingdir" [, flag]] ) Parameters filename The name of the executable (EXE, BAT, COM, PIF) to run. workingdir [optional] The working directory. flag [optional] The "show" flag of the executed program: @SW_HIDE = Hidden window @SW_MINIMIZE = Minimized window @SW_MAXIMIZE = Maximized window Return Value Success: Returns the exit code of the program that was run. Failure: Depends on RunErrorsFatal; see Remarks. Edited March 4, 2006 by JdeB 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