Window Operations * SCW.

<< Click to Display Table of Contents >>

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

Window Operations * SCW.

"E" - Exclude window"

Previous Top Next


MiniRobotLanguage (MRL)

 

"E" - Flag "Exclude window"

Search Child Window

 

 

Intention

 

Imagine you have several equal buttons or controls, which you want to handle one after the other.

Yes, there are features available to do that, for example the "r"-Flag (Window-number), or the "n"-Flag "leveled window number".

 

But how about excluding those windows which you have already handled from further window searches?

 

To understand this you need to know that there is a  Window Search "Exclude-List". In fact there is one such list for Top-windows and there is one such list for child-windows.

 

Once in that list, a window can not be found by STW. or SCW. in a window search.

 

Now if you add a window to this "Exclude List", it will not be found any more. Not with SCW. and not with ICW. It will be there but it will be ignored.

 

How do you add a window to the "Exclude List"?

 

STW.c|WindowClass

' Will add a button to the Exclude-List

SCW.cE|button

MMV.

 

And how do you remove a window from the "Search Exclude List"?

This is what the "I"-Flag is good for.

 

' Remove window from exclude List

STW.I|$$HWN

 

The "I"-Flag however need a window handle as parameter and will not work in any other constellation. Therefore keep the handles of those excluded windows, if you want to have them back later.

 

Can you clear the whole list with one strike?

 

Yes, you can also use the "K"-Flag.

 

' clear whole exclude List

STW.c|WindowClass

SCW.K

 

The "K"-Flag will immediately, even before the search starts, clear the exclude list. No matter if a window is found or not, using the prototype "K" will clear the exclude list.

Unlike the "I"-Flag, the "K"-Flag can be combined with any other window search.

 

After this all previously "exclude listed" windows can be found again.

 

 

 

Short Examples:

 

-

 

 

Example

 

-

 

 

 

Remarks

 

Windows which have been closed, and all their child-windows, will automatically be removed from the exclude list. There is no need to remove them manually from the exclude list.

If anyway you want to remove a window from the exclude list,  you can use the "I"-Flag.

To completely clear the Exclude list, use the "K"-Flag.

 

When locating Top-Windows using STW. there is also Exclude-List available. The Exclude List for Top-Windows is a separate list and will therefore survive if you clear the exclude list for Child-Windows.

 

Currently you can not check which windows are exclude-listed. There is also no way of showing the content of an exclude-list.

 

 

 

Limitations:

 

 

 

 

See also:

 

    1. STW. - Decription

    SCW - Search-Child-Window

    "I" - Flag - SCW.

    "K" - Flag - SCW.