<< Click to Display Table of Contents >> Navigation: 3. Script Language > Window Operations > Window Operations |
MiniRobotLanguage (MRL)
IWI. Conditional Statement
If Window Iconized
Intention
Conditional Statement. Test if a specified window is iconic (minimized) or not.
If no parameter is given, the actual window is been tested.
Test if one or more specified window(s) are iconic or not. If no parameter is given, the actual window is been tested.
You can iconize and normalize child- or top-windows using the SWS. - Set Window State .-command.
If you give parameter, these must be window handles, or the letters "c" or "t".
These letters stand for "child" and "Top". If given they will be replaced with the last window of that kind that has been localized.
c - last localized child-window
t - last localized Top-Window
Please note, that if the actual window is a child-window (e.g. a button), you need to specify "t" as parameter,if you want to test the actual top-window. Some examples:
'Get first window handle
STW.ct|CabinetWClass|c:
HTV.$$HAA
'Get second window handle
STW.ct|Chrome_WidgetWin_0|meebo.com
HTV.$$HAB
'Test both handles
IWI.$$HAA|$$HAB
DBP.All windows are iconic
ELS.
DBP.At least one of the windows is not iconic
EIF.
ENR.
Other modes of operation are:
' Check actual located window
IWI.
' check last located child window
IWI.c
' check actual Top-window
IWI.t
' check window with handle in $$MYH
IWI.$$MYH
NWI. is the negative version "Not Window Iconic".
Syntax
IWI.[P1][|Px]… ELS. … EIF.
Parameter Explanation
P1 - numeric/variable or "c" or "t". If omitted actual
window is taken.
P2 - optional parameters which are also tested for enabled.
If one of them is disabled the test fails (implicit=AND).
Can be up to 20 additional parameters.
IWI.'s can be nested to unlimited Depth, and they can also enclose Sub-Program Calls or FEX. (Enumerations) to unlimited Depth.
Example
'***********************************
' IWI.-Sample
'***********************************
STW.t|Sample
MMV.
IWI.
MBX.Ok
ELS.
MBX.Diabled!
EIF.
END.
Remarks
-
Limitations:
-
See also:
• IWS. / NWS. - If Window State
• IWE. / NWE. - If Window Enabled
• IWV. / NWV. - If Window Visible
• IWZ. / NWZ. - If Window Zoomed