Window Operations * ITW. / NTW.

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Window Operations > ITW. - If Top Window >

Window Operations * ITW. / NTW.

"I" - Flag "remove from Exclude List"

Previous Top Next


MiniRobotLanguage (MRL)

 

"I" - Flag "remove from Exclude List"

If Top Window

 

 

Intention

 

Imagine you have several equal windows, 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 your could use FEW.

 

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".

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

 

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

 

ITW.cE|WindowClass

MMV.

ELS.

'...

EIF.

 

And how do you get the window out the "Exclude List"?

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

 

' Remove window from exclude List

ITW.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.

 

There is another way, how to search windows which are currently excluded from search?

You can also use the "K"-Flag.

 

' clear whole exclude List

ITW.Kc|WindowClass

 

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.

 

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

 

 

 

 

Example

 

' Use Exclude List

' Add window to exclude list

ITW.tE|TestApp

VAR.$$HWN=#hwn#

EIF.

' Remove window from exclude List

ITW.I|$$HWN

'...

EIF.

' If you comment the ITW. above the window can not be found here:

ITW.t|TestApp

'...

EIF.

ENR.

 

 

 

 

 

Remarks

 

Windows which have been closed, 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 Child-Windows using SCW. there is also Exclude-List available. The Exclude List for Child-Windows is a separate list and will therefore survive if you clear the exclude list for Top-Windows.

 

 

Limitations:

 

There are no limitations about the number of windows you may add to the exclude list.

 

 

 

See also:

 

    "E" - Flag - ITW.

    "K" - Flag - ITW.