Runs an external program and returns its exit code.
| Number | Type | Compulsory | Default | Description |
| 1 | string | Yes | Path to executable file | |
| 2 | string | No | Options | |
| 3 | string | No | stdout and stderr output directed to message window | File to receive redirected output |
File system path to executable file. This would usually be a binary executable but may be any file that is defined as executable by the operating system.
;
| 'wait' | If specified, the function will not return until the called process has exited. |
| 'command' | Calls OS command line interpreter to execute the command supplied. This can be used to execute system commands such as 'copy' and 'move'. |
| 'stdout' | Stdout from the process is displayed in the command shell message window. Requires either 'wait' or file redirection see argument 3 |
| 'stderr' | Stderr from the process is displayed in the command shell message window. Requires either 'wait' or file redirection see argument 3 |
| 'console' | Opens a console window to execute the process. Disables stdout and stderr |
If stdout or/and stderr are specified, the output can be optionally directed to a file. Use this argument to specify the file to receive the output
Return type: real array
| Index | Description | ||||||||||||||
| 0 | Process exit code. If the process is still running when this function returns, this value will be 0. | ||||||||||||||
| 1 |
Error code as follows:
|
||||||||||||||
| 2 | PID of process. This will be -1 if the process is no longer running |
| ▲Function Summary▲ | ||
| ◄ SetUnion | ShellExecute ▶ | |