Execution Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Execute-Commands >

Execution Commands

EXB. - Execute Blocking

Previous Top Next


MiniRobotLanguage (MRL)

 

EXB. Command

Execute Blocking. Halt script execution until the started program has finished.

 

 

Intention

 

Run an executable program synchronously and deliver the exit-code. The current script is suspended until the called program ends.

 

The Exitcode (Error-level, Returncode) of the started application/command-line will be placed on the stack (TOS).

 

Usage of EXB. is as simple as it can be:

 

VAR.$$LNK=?exepath\Sample Apps\TestApp_01.exe

EXB.$$LNK

 

You can add a window-size parameter P2  for example if you want the application to start maximized or minimized.

 

' Start the application maximized

EXB.$$LNK|3

 

As an alternative to EXB. you can use EXE. and use the PID together with WPT.

 

' Wait until the started application ends

VAR.$$LNK=?exepath\Sample Apps\TestApp_01.exe

EXE.$$LNK

WPT.#pid#

ENR.

 

You can work with the started application from a parallel running robot.

See example below.

 

 

Syntax

 

 

EXB.P1[|P2]

 

 

Parameter Explanation

 

P1 - Document-Filename (can be a hyperlink)

P2 - Window Size Parameter

You can use the following window-size parameters

 

0 - HIDE    -   Hides the window and activates another window.

1 - SHOW NORMAL   Activates and displays a window.

2 - SHOW MINIMIZED - Activates the window and displays it as a

   minimized window.

3 - MAXIMIZE -   Maximizes the specified window.

4 - SHOW-NO-ACTIVATE - Displays a window in its

   most recent Size and position.

   The active window remains active.

5 - SHOW - Activates the window and displays it

   in its current size and position.

6 - MINIMIZE - Minimizes the specified window and

   activates the next top-level window in the Z order.

7 - SHOW-MIN-NO-ACTIVE - Displays the window as

   a minimized window. The active window remains active.

8  - SHOW-NO-ACTIVE - Displays the window in its current state.

     The active window remains active.

9 - RESTORE - Activates and displays the window.

10 - SHOW-DEFAULT - Sets the SHOW STATE to default.

 

The Exitcode (Errorlevel, Returncode) of the started Application/comandline will be placed on the stack (TOS).

 

 

Example

 

'***********************************************

' Example 1 - without Windows-Parameter

'***********************************************

' First we start a Parallelrobot that will

' end the started Application after 5 seconds.

PRR.

 PAU.5

 KPN.TestApp_01.exe|a

 ENR.

PRE.

' EXB. - Beispiel

VAR.$$LNK=?exepath\Sample Apps\TestApp_01.exe

' Here we will wait until the Application ends

EXB.$$LNK

DBP.Exit-Code: $tos$

ENR.'**********************************************

 

 

 

 

Remarks

 

Technical remark: EXB. uses synchronous Shell- / Create-Process-Technology and is compatible with other commands that use this technology.

 

EXB. will suspend the script process until the started process has ended.  The script process is not waiting, its suspended. The suspended script process does not need any CPU resources, but also does not react on any message or whatever.

 

 

 

Limitations:

 

-

 

 

See also:

 

    1.7. Application and PID

    3.3 Specialfolders

    EXX. - Execute-Extended

    EXE. - Execute Programm

    EXH. - Execute-Handle

    EXA. - Execute Asynchron

    EXO. - Execute Open Document

    IEF. / NEF. - If - exist - File

    IEP. / NEP. - If-Exists-Process