Window Operations * STW.

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Window Operations > STW. - Search Top Window >

Window Operations * STW.

"f" - Flag "disabled windows"

Previous Top Next


MiniRobotLanguage (MRL)

 

"f" - Flag "disabled windows"

Search Top Window

 

 

Intention

 

To ignore disabled windows is one of the default settings of the STW. command. Therefore if you want to search for a window that has been disabled, you will need the "f"-flag.

 

The "f"-Flag will override the default behavior. It will make STW. to ignore enabled windows and just look for disabled 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 invisible windows. If you do not want that, just add a prototype "v" 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 "f" - flag together with the "a" to search only windows that are disabled. No matter if they are visible or not.

 

Lets take a look, on this. This will search only for disabled windows.

 

STW.cf|WindowClass

MMV.

 

Now we would like to search for windows which are enabled, as well for disabled windows. We can do that in two ways.The first way is like this:

 

STW.cef|WindowClass

MMV.

 

The robot understands that we want enabled and disabled windows. If we just give all two prototypes. But there is another way to do it. We can do this:

 

STW.cav|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 invisible windows. We do this by adding the "v"-Flag after the "a". In this case the "v"-Flag will override the "a"-Flag. And tell the robot "we just want visible windows.".

 

 

 

Example

 

' Start an Application only, if that Application is not yet running.

'

STW.wtUX|0|BCS - Testform|found

EXE.?exepfad\Sample Apps\BSC-Testform.exe

:found

 

' Next we disable the whole window

SWS.d

' Wait half of a second

PAU.0.5

' Try to locate it using "e"

' Will work, we get the window

STW.wtd|0|BCS - Testform

 

ENR.

 

 

 

 

Remarks

 

 

 

 

Limitations:

 

 

 

 

See also:

 

    "e" - Flag - STW.

    "u" - Flag - STW.

    "v" - Flag - STW.

    "a" - Flag - STW.