<< Click to Display Table of Contents >> Navigation: 3. Script Language > Execute-Commands > Execution Commands |
MiniRobotLanguage (MRL)
EXD. Command
Execute Direct Command
Intention
Starts a File/executable. EXD. will try to deliver #pid# and #tid#. EXD. is generally a non-blocking command. This means that normally script execution goes on, while the started application is still running.
But there is a chance, that EXD. can possibly be blocked by some applications.
Use another command in that case, for example EXA. - Execute Asynchron.
EXD. will only start executable files. Usage is as simple as this:
EXD.?pfad\TestApp.exe
You can specify a command-line parameter for the started application.
EXD.?pfad\TestApp.exe|your command-line
If EXD. can not start the file, the timeout-flag #tio# will be set to 1, else it will be reset to 0.
Syntax
EXD.P1[|P2]
Parameter Explanation
P1 - executable with complete path
P2 - (optional) command-line Parameter for the started application
Example
'***********************************************
' Example 1
'***********************************************
' Start the batch file
EXD.?ws\cmd.exe|/c "?desktop\Test.bat"
' Wait until the batch file has ended
WPT.#pid#
'**********************************************
Remarks
Technical remark: EXD. uses Create-Process--Technology and is compatible with other commands that use this technology.
EXD. is non-blocking, but can be blocked by a process that it has started. If this turns to be a problem, choose EXA. or EXF. instead. For starting Batch-Files, prefer EXC. - Execute Command.
Limitations:
There may be cases where EXC. seems not to deliver the proper PID/ TID. This depends on the target application, and may be influenced by the fact, if the target application is already running or not. In a closer look, the PID and TID from EXC. was accurate, but the target application gave control to another (already running or newly started) instance of herself.
See also:
• EXO. - Execute Open Document