<< Click to Display Table of Contents >> Navigation: 3. Script Language > Execute-Commands > Execution Commands |
MiniRobotLanguage (MRL)
EXC. Command
Execute Batch Command
Intention
Starts a Batch-File. EXC. will try to deliver #pid# and #tid#. EXC. is generally a non-blocking command. This means that normally script execution goes on, while the started application is still running.
EXC. will only Batch-files. Usage is as simple as this:
EXC.?desktop\test.bat
You can omit the ".bat" and write also:
EXC.?desktop\test
Which will do just the same. Also you can specify a second parameter, as the current directory for the batch process:
EXC.?desktop\test.bat|?desktop\
While EXC. is generally a "Non blocking" command, you can make it wait until the batch file is processed, like this:
EXC.?desktop\test.bat|?desktop\
WPT.#pid#
If EXC. can not start the file, the timeout-flag #tio# will be set to 1, else it will be reset to 0.
Syntax
EXC.P1[|P2]
Parameter Explanation
P1 - batch file path and name
P2 - (optional) current directory for the batch process
Example
'Example-Batch File: "Test.bat"
@ECHO off
ECHO Hello World!
PAUSE
'***********************************************
' Example 1
'***********************************************
EXC.?desktop\test.bat
'**********************************************
'***********************************************
' Example 2 - using Windows-Parameter
'***********************************************'
'
EXC.?desktop\test.bat|?desktop\
'**********************************************
Remarks
-
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
• WPT. - Wait-Process-Termination