AIT_Exec

Description

Executes a specified application file.

Format

bool AIT_Exec  (
 string strExeName,     // Application filename
 integer nShowState     // Displayed
);

Parameters

strExeName (input)

Specify an application filename.

nShowState (input)

Specify how to display the application. You have to specify one of the following values.

ValueDescription
SW_HIDEDoes not display the application.
SW_SHOWNORMAL
or
SW_NORMAL
Normally displays the application.
SW_SHOWMINIMIZEDMinimize the application.
SW_SHOWMAXIMIZED
or
SW_MAXIMIZE
Maximizes the application.
SW_SHOWNOACTIVATENormally displays the application with no focus.
SW_SHOWMINNOACTIVEMinimizes the application with no focus.

Return values

The return value is true if the function was executed normally, and false if not.

If the function has returned false, you can use AIT_GetLastError to acquire an extended error code. The following gives the error codes that AIT_GetLastError might return:

Extended error numberError code
2ERROR_FILE_NOT_FOUND
3ERROR_PATH_NOT_FOUND
5ERROR_ACCESS_DENIED
8ERROR_NOT_ENOUGH_MEMORY
14ERROR_OUTOFMEMORY
21ERROR_NOT_READY
87ERROR_INVALID_PARAMETER
123ERROR_INVALID_NAME