<< Click to Display Table of Contents >> Navigation: 3. Script Language > Window Operations > ITW. - If Top Window > Window Operations * ITW. / NTW. |
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
ITW.ctVw|PBWindowClass:0|BCS|Sub|1
' Move Mouse to the Install Button
SCW.ct|butt|Install
MMV.
EIF.
ENR.
'-----------------------------------------------------------
' This Subprogram will be called if the window is not found
:Sub
EXE.?exepfad\Sample Apps\BSC-Testform.exe
ITW.ct|PBWindowClass:0|BCS
'
EIF.
RET.
The script above will try to locate the "BCS - Testform" and if its not yet started, it will be started and localized.
Example
ITW.ctVw|PBWindowClass:0|TestAppx|Sub|1
MBX.Ready
EIF.
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: