<< Click to Display Table of Contents >> Navigation: 3. Script Language > Window Operations > STW. - Search Top Window > Window Operations * STW. |
MiniRobotLanguage (MRL)
"V" - Flag "GoSub if not found"
Gosub if not found
Intention
If the window you are looking for is not found within the specified waiting time, several things can happen. Normally you will get an error-message.
But that does not necessarily be what you want. Maybe you want just to see if the window is there and if not start the program in a Subroutine.
' "V" - Flag - on not found Gosub
STW.ctVw|PBWindowClass:0|BCS|Sub|1
' Move Mouse to the Install Button
SCW.ct|butt|Install
MMV.
ENR.
'-----------------------------------------------------------
' This Subprogram will be called if the window is not found
:Sub
EXE.?exepfad\Sample Apps\BSC-Testform.exe
STW.ct|PBWindowClass:0|BCS
RET.
The script above will try to locate the "BCS - Testform" and if its not yet started, it will be started and localized.
Example
STW.ctVw|PBWindowClass:0|TestAppx|Sub|1
MBX.Ready
ENR.
'-----------------------------------------------------------
:Sub
MBX.Error - Program not found
RET.
Remarks
Limitations:
You can not mix the "V" and the "W"-Flag. If both are found, the "W"-Flag takes priority
See also: