<< Click to Display Table of Contents >> Navigation: 3. Script Language > Window Operations > SCW. - Search-Child-Window > Window Operations * SCW. |
MiniRobotLanguage (MRL)
"g"-Flag "Goto on found"
Search Child Window
Intention
If the child-window (button/control .. etc.) 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.
If you also use the "X"-Flag to tell the robot to just continue with the script in case of an error - if the window is not found, then you can just reverse the normal behavior of the SCW.-command..
Sometimes this can be a perfect solution - depending on the process flow, that you want to implement.
Note that the 3.1 Systemvariables #tio# and #til# will always flag if the child-window was found or not. This does not depend on the usage of the "o" or "g" or "X"-Flags. Therefore you can later still find out what happened.
Here is an example
SCW.Xtg|OK|found
MBX. The OK-Button was not found!
END.
:found
MBX.The OK-Button was found.
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.
Short Examples:
SCW.Xtg|OK|found
MBX. The OK-Button was not found!
END.
:found
MBX.The OK-Button was found.
ENR.
Example
'**********************************************
' SCW-Sample
'**********************************************
' Start TestApp only, if it's is not yet running.
'
STW.wtUXg|0|TestApp|found
EXE.?exepfad\Sample Apps\TestApp_01.exe
:found
STW.t|testapp
SCW.tog|button 1|ero|found
' Script will nver get here!
END.
:found
GCT.
SCW.to|button 1|ero
SWS.vd
ENR.
:ero
MBX.Window not found!
ENR.
Remarks
If you specify the "g"-Flag "on found Goto" together with the "W"-Flag (on found GoSub), then the "g"-Flag takes priority and the "W"-Flag will be ignored.
Limitations:
-
See also: