<< Click to Display Table of Contents >> Navigation: 3. Script Language > Window Operations > SCW. - Search-Child-Window > Window Operations * SCW. |
MiniRobotLanguage (MRL)
"v" - Flag "visible"
Search Child Window
Intention
To ignore invisible windows is one of the default settings of the SCW. command. Therefore you will not need to specify the "v"-Flag often.
It can however make sense, to override the default behavior by using the "u"-flag which will make SCW. to visible windows and just look for invisible windows.
If you want to catch both, the "a"-flag is what you need.
However the "a"->Flag will automatically also switch on the search for disabled windows. If you do not want that, just add a prototype "e" after the "a". As the prototype on the right has a higher priority, you get exactly what you want this way.
In the same way, you can use the "v" - flag together with the "a" to search only windows that are visible. No matter if they are enabled or not.
Lets take a look, on how to do this. In this case we will look at it with STW., but its equal for SCW. and ICW. This will search only for visible windows.
STW.cv|WindowClass
MMV.
Since this is a default behavior of SCW., we have wasted the "v" at this place. Its not needed.
Now we would like to search for windows which are visible, as well for invisible windows. We can do that in two ways.The first way is like this:
STW.cuv|WindowClass
MMV.
The robot understands that we want visible and invisible windows. If we just give all two prototypes. But there is another way to do it. We can do this:
STW.cae|WindowClass
MMV.
The "a" Flag says "search all windows", enabled, disabled, visible and invisible. Now we just need to tell the robot that we do not want to get the disabled windows. We do this by adding the "e"-Flag after the "a". In this case the "e"-Flag will override the "a"-Flag. And tell the robot "we just want visible windows.".
Short Examples:
-
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.to|button 1|ero
SWS.i
GCT.
SCW.tuo|button 1|ero
SWS.vd
GCT.
SCW.tfo|button 1|ero
SWS.id
GCT.
SCW.tufo|button 1|ero
SWS.
ENR.
:ero
MBX.Window not found!
ENR.
Remarks
-
Limitations:
See also:
• 1.4. The Prototype Parameter System