Window Operations * WCW.

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Window Operations > WCW. -  Wait for new Child-Window >

Window Operations * WCW.

WCW - Wait for new Child-Window

Previous Top Next


MiniRobotLanguage (MRL)

 

WCW. Command

Wait for new Child Window

 

 

Intention

 

This command localizes a specified Child-Window (Control, Button etc.) within a previous localized Top-Window (Application-Window).

 

Unlike SCW. the WCW. Command will only recognize new Childwindows or Child-Windows that change after the Command was called.

 

To understand this command, be sure to read the chapters:

1.8. Selecting the Application (Topwindow)

and

1.9. Locating Child-Windows

first.

 

It will then sets the Mouse-Target Point into the window-center.

 

WCW. has a lot of features, which are controlled using the 1.4. The Prototype Parameter System .Be sure you have read and understand that chapter before trying to understand WCW.

 

Unless using the "T"-Option, the WCW.-command needs a Top-Window being localized first. Therefore please read the section 1.8. Selecting the Application (Topwindow) carefully.

 

The Command has a "Rollback" Feature, when the Child-Window is not found in few Seconds. It jumps back to the STW. (Search Top-Window) and tries to get a new Top-Window, which possibly has the wanted button or control.

This will continue, until its time has run out.

If you use the DBM.1 -command, you can see these "Rollback-Jumps" in the Debugging-Console. See the example below.

 

DBM.1

STW.Act|PBWindowClass:0|TestApp

' This button/childwindow does not exist

WCW.nctb|2|Button|Button 23|.5

MLE.

 

graphic

 

You can control this Feature using the "b" - Backjump-Time Flag.

 

 

 

 

 

 

Syntax

 

WCW.[Prototypes|][Parameters|]

 

 

Parameter Explanation

 

Parameter

 a - (np) "all" - search all windos, includes

     invisible and disabled windows.

 b - (p) "backjump"-flag, time in seconds, 0 disables the jump

 c - (p)  window-class

 d - (p) window-depth

 e - (np) enabled, window must be enabled

 f - (np) disabled, window must be disabled

 g - (p) Goto on found

 h - (p) handle. Immediately locate the window with given handle.

     All other prototypes will be ignored.

 i - (p) window-id

 j - (p) WaitForInputIdle (Value)

 k - (np) WaitForInputIdle (no Value), use value

      from last Call/default-value    

 n - (p) Fensternumber in der Ebene ("WR->SWC")

 o - (p) on not found goto (Label)

 p - (p) Process-ID (PID)

 q - (p) Thread-ID (TID)

 r - (p) result number ("WR-SPC-Count")

 s - (np) internal reversing at child windows search

 t - (p) text

 u - (np) invisible, window must be invisible

 v - (np) visible, window must be visible

 w - (p) total waiting-time in Seconds, fractions (0.5)

     are possible, zero is possible.

 

 E - (np) Add Window to Exclude List after localization  

 I - (p) p = handle. Locate window and remove window

     from Exclude list.

 K - (n) Immediately clear Exclude-List before specified search

 Q - (n) use previous Prototypes

 S - (n) Search only next Level (SWC-Option)

 T - (n) Search desktopwide, ignore localized Top-Window

 V - (p/Label) Gosub on not found

 W - (p/Label) Gosub on  found  

 X - (n) Run without Error on not found

 

  Explanation:

    (np) -> only prototype, no additional parameter required

  (p) -> prototype requires additional parameter

    (NUM/VAR) - window handle/variable

(p/Label) - Label-Parameter required, can also be a

             variable that contains the label

 

 

P2 - Parameters, separated by | according to the prototypes

 

 

 

 

Example

 

STW.Act|PBWindowClass:0|TestApp

WCW.nctE|2|Button|Button 2

' Coordinates relative to left, upper corner of button

MPO.o|42,22

MLE.

 

 

Remarks

 

When using WCW. to check if a child-window is available or not, it makes sense that you use the "b"-flag with a value of "0" to disable the backjump.

 

 

 

Limitations:

-

 

 

See also:

 

    1.4. The Prototype Parameter System

    3.2 Standard-Search Pattern

    1.5. Features and Hints

    1.9. Locating Child-Windows

    1.8. Selecting the Application (Topwindow)

    1.7. Application and PID

    3.1 Systemvariables

    !. STW. - Description