Window Operations * SCW.

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Window Operations > SCW. - Search-Child-Window >

Window Operations * SCW.

"e" - Flag "enabled"

Previous Top Next


MiniRobotLanguage (MRL)

 

"e"-Flag "enabled"

Search Child Window

 

 

Intention

 

graphic

 

The picture shows an enabled button (Install) and a disabled button (Next).

 

To ignore disabled child-windows (button, controls etc.)  is the default behavior of the SCW. command. Therefore you will not need to specify the "e"-Flag often.

It can however make sense, to override the default behavior by using the "f"-flag which will make SCW. to ignore enabled child-windows and just look for disabled child-windows. This could be an button that is disabled, for example.

 

If you want to catch both, enabled and disabled child-windows, the "a"-flag is what you need. However the "a"->Flag will automatically also enable the search for invisible child-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 "e" - flag together with the "a" to search only child-windows that are enabled. No matter if they are visible or not.

 

For example. This will search only for enabled child-windows.

 

STW.c|WindowClass

SCW.ect|button|ok

MMV.

 

Since this is a default behavior of SCW., we have wasted the "e" at this place. Its not needed. Now we would like to search for child-windows which are enabled, as well for disabled windows. We can do that in two ways.The first way is like this:

 

STW.c|WindowClass

SCW.efct|button|ok

MMV.

 

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

 

STW.c|WindowClass

SCW.aect|button|ok

MMV.

 

The "a" Flag says "search all child-windows", enabled, disabled, visible and invisible. Now we just need to tell the robot that we do not want to get the disabled child-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 enabled child-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

 

You can enable buttons if they are disabled. You do this, using the SWS.e -command. This way you can click buttons, you would normally not be able to click.

 

 

Limitations:

 

-

 

 

See also:

 

    1. STW. - Decription

    SCW - Search-Child-Window

    "f" - Flag - SCW.