Jump to content
Sign in to follow this  
Trendz

Reading value returned by VB .exe

Recommended Posts

Trendz

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

Share this post


Link to post
Share on other sites
Jos

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 by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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  

×