Jump to content

Reading value returned by VB .exe


Recommended Posts

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

  • Developers

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 etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...