Execution Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Execute-Commands >

Execution Commands

EXH. - Execute Handle

Previous Top Next


MiniRobotLanguage (MRL)

 

EXH. Command

Execute Handle

 

 

Intention

 

Starts a program and returns directly the Window-Handle and the PID of the stared program.

The system Variable #pid# is set to the PID of the started process. #tid# is set to 0.

The Top-window handle from that process is been placed on the stack (TOS).

 

EXH. is using the Settings of OPT. for WII (Wait for Input Idle) and for WS (Windows-Size).

 

 

 

Syntax

 

 

EXH.P1

 

Parameter Explanation

 

P1 - complete Path and Executable (incl. Commandline)

 

This command will wait until the process is started and has a valid PID. It will then try to catch a window from that process within 30 seconds.

 

uses several general settings and sets the Systemvariable #pid#.

 

The general settings include:

- Sleep time in waiting-cycle

 

 

 

 

Example

 

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

' Example EXH.

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

EXH.?exepath\Sample Apps\TestApp_01.exe

VAR.§§HWN=$$000

MBX.PID=#pid# / Handle=§§HWN

ENR.

 

 

 

Remarks

 

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

 

The general default waiting time, that the program actually waits for a window to appear can not be changed at this time. This will be possible in a future version.

 

 

Limitations:

 

If the process you start, does not create a window by itself, this command will wait up to 30 seconds for such a window and set the timeout flag if no window appeared in this timne. Take for example the "Google Chrome" Browser. If you start it like this:

 

EXH.C:..\chrome.exe

 

and there are already running instances of it, the starting process is not the process that finally creates the window that you get to see. Therefore the command would end up waiting for a window that will never come.

 

Here is another example that will solve this issue using CAW.

 

CAW.RegEdit_RegEdit|Reg&AND:Edit

EXX.regedit

STS.DUMP

MBX.Ready

 

 

 

See also:

 

    3.3 Specialfolders

    EXX. - Execute-Extended

    EXE. - Execute Programm

    OPT. - Optional Settings