Previous Topic: EnumValueNext Topic: Exit


Execute

Execute

Exceutes an executable or dll. If the execute is unable to find the file or dll to make the call, the function returns false.

First parameter:

The first parameter is the path to what is to be executed. If the path is to a dll, then the API function needs to be right after two colons. The format of the dll call is PATH::APIFunctionName. The Execute for dll only looks for calls in two types of functions:

    int FunctionName();
    int FunctionName( const char * );
Second parameter:

If the call takes command line arguments, enter the arguments or enter an empty string.

Third parameter:

A Boolean value that indicates whether the script will wait for an Executable to complete. This parameter is ignored for dll calls.

Examples:
/*executes notepad with the following file, myfile.txt and waits for the process to end.*/
Execute( "c:\\windows\\notepad.exe", "myfile.txt", true );

/*executes notepad without parameters and waiting.*/
Execute( "c:\\windows\\notepad.exe" );

/* makes a call into the dll with parameters*/
Execute( "c\\windows\\Somelib.dll::CheckNetwork", "000d1");

**Note the format for dll PATH::APIFunctionName