<< Click to Display Table of Contents >> Navigation: 3. Script Language > Window Operations > SCW. - Search-Child-Window > Window Operations * SCW. |
MiniRobotLanguage (MRL)
"u" - Flag "invisible"
Search Child Window
Intention
To ignore invisible windows is one of the default settings of the SCW. command. Therefore if you want to search for a child-window that has is invisible, you will need the "u"-flag.
The "u"-Flag will override the default behavior. It will make SCW. to ignore visible windows and look for invisible windows, only.
If you want to catch both, the "a"-flag is what you need.
However the "a"->Flag will automatically also enable 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 "u" - flag together with the "a" to search only windows that are invisible. No matter if they are enabled or not.
Lets take a look, on this. We'll show it with Top-Windows (STW.) here, but the system is completely equal for SCW. and ICW. This will search only for invisible windows.
STW.cu|WindowClass
MMV.
Now we would like to search for windows which are visible, as well as 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