Window Operations

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Window Operations >

Window Operations

IEW. / NEW. - If Exist Window

Previous Top Next


MiniRobotLanguage (MRL)

 

IEW. Conditional Statement

If Exist Window

 

 

Intention

 

Conditional Statement. Test if one or more (up to 20) a specified window handle(s) is valid or not. A window handle is valid until the corresponding window has been closed (destroyed).

 

IEW. tells you,  if the actual window is still available or has been closed.

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|F:\00_RPGM

HTV.$$HAA

'Get second window handle

STW.ct|Chrome_WidgetWin_0|meebo.com

HTV.$$HAB

'Test both handles

IEW.$$HAA|$$HAB

 DBP.All windows are alive  

ELS.

 DBP.At least one of the windows is history

EIF.

ENR.

 

Other modes of operation are:

 

' Check actual located window

IEW.

 

' check last located child window

IEW.c

 

' check actual Top-window

IEW.t

 

' check window with handle in $$MYH

IEW.$$MYH

 

 

NEW. is the negative version "Not Exist Window".

 

 

 

Syntax

 

 

IEW.P1[..|Px] … ELS. … EIF.

 

 

Parameter Explanation

 

P1 - numeric or "c" or "t". Can be Variable that contains a window handle. If omitted actual window is taken. You can also use these letters:

     

        c - last localized child-window

        t - last localized Top-Window

 

If you add multiple handles, they are AND'ed with IEW. If ANY of the given handles is invalid, the instruction will fail.

 

If you give multiple handles with NEW. (negative form of the command), the opposite will happen. If all of the given handles  are valid, the instruction will fail.

 

 

IEW.'s can be nested to unlimited Depth, and they can also enclose Sub-Program Calls or FEX. (Enumerations) to unlimited Depth.

 

 

Speed in Ticks:

This command uses typically around 290 Ticks.

 

 

Example

 

'***********************************

' IEW./NEW.-Sample

'***********************************

STW.t|Sample

MMV.

IEW.

MBX.Ok

ELS.

MBX.Diabled!

EIF.

END.

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also:

 

    1.8. Selecting the Application (Topwindow)

    HTV. Handle-to-Variable

    !. STW. - Description

    ! SCW - Search-Child-Window

    "h" - Flag - SCW.