<< Click to Display Table of Contents >> Navigation: 3. Script Language > Window Operations > Window Operations |
MiniRobotLanguage (MRL)
IWE. Conditional Statement
If Windows Enabled
Intention
Conditional Statement.
Test if one or more specified window(s) are enabled or not. If no parameter is given, the actual window is been tested.
You can enable or disable child- or top-windows using the SWS. - Set Window State .-command.
IWE. tells you, if the actual window is enabled or has been disabled. If no parameter is given, the actual window is been tested. 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
IWE.$$HAA|$$HAB
DBP.All windows are enabled
ELS.
DBP.At least one of the windows is disabled
EIF.
ENR.
Other modes of operation are:
' Check actual located window
IWE.
' check last located child window
IWE.c
' check actual Top-window
IWE.t
' check window with handle in $$MYH
IWE.$$MYH
NWE. is the negative version "Not Window Enabled".
Syntax
IWE.[P1][|P2]… 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.
IWE.'s can be nested to unlimited Depth, and they can also enclose Sub-Program Calls or FEX. (Enumerations) to unlimited Depth.
Example
'***********************************
' IWE./NWE.-Sample
'***********************************
STW.t|Sample
MMV.
IWE.
MBX.Ok
ELS.
MBX.Diabled!
EIF.
END.
Remarks
-
Limitations:
-
See also:
• IWS. / NWS. - If Window State
• IWI. / NWI. - If Window Iconic
• IWV. / NWV. - If Window Visible
• IWZ. / NWZ. - If Window Zoomed