Window Operations * STW.

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Window Operations > STW. - Search Top Window >

Window Operations * STW.

"g" - Flag "goto if found"

Previous Top Next


MiniRobotLanguage (MRL)

 

"g" - Flag "Goto if found"

Goto if found

 

 

Intention

 

If the window you are looking for is found within the specified waiting time, normally the script just continues. You can however ask the robot to jump to a Label in that case.

And you can use the "X"-Flag to tell the robot to just continue with the script in case of error - if the window is not found.

This would change the behavior of the command, but sometimes this can be a good solution. Take this example:

 

' Run application only if the window is not found

'

' t - text (caption of the window)

' g - goto Label "GoOn" if the window was found

' X - continue the script as normal, without error,

'     if the window is not found

STW.tgXw|BCS|GoOn|0

EXE.?exepfad\Sample Apps\BSC-Testform.exe

:GoOn

MBX.Ready

ENR.

 

In case you use the "g"-Flag, together with the "W" -Flag ("on Found Gosub"), the "W"-Flag will be ignored. The "g"-Flag has a generally higher priority.

 

 

 

Example

 

' Run application only if the window is not found

'

' t - text (caption of the window)

' g - gotoLabel "Sub" if thewindow was found

' X - continue the script as normal, without error,

'     if the window is not found

STW.tgXw|BCS|GoOn|0

EXE.?exepfad\Sample Apps\BSC-Testform.exe

:GoOn

MBX.Ready

ENR.

 

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also:

 

    "o" - Flag - STW.

    "V" - Flag - STW.

    "W" - Flag - STW.

    "X" - Flag - STW.