<< Click to Display Table of Contents >> Navigation: 3. Script Language > Window Operations > Window Operations |
MiniRobotLanguage (MRL)
GCT. Command
Get Childs Topwindow
Intention
The GCT-Command can be used to return the Top-Window of the currently located Window, whether it is a child or a Top-Window.
If you have multiple equal Top-Windows, and you need to locate a "Non-unique" button in just one of them, GCT. and SCW. will help you to do the trick.
First use the SCW.-command with the "T"-Flag to search directly a "unique child-window" (static, button etc.) in the proper application-window. Next use GCT. to get the Top-Window of it. From that point you can locate another control in that window, using SCW..
You can use SAO to search a Desktop-Element and get the Top-Window using GCT.
GCT. will also set the Backjump-Line to its line number. Therefore all following SCW. will rollback to GCT.
Syntax
GCT.[P1][|P2]
Parameter Explanation
P1 - Variable with a Window-Handle
P2 - Variable P2 is been loaded with the Handle of the
Top-Window from P1.
If P1 is given, the Top-Window of P1 is been calculated and located.
If P1 and P2 is given, Variable P2 is been loaded with the Handle of the Top-Window from P1. The Top-Window is NOT located in this case.
Example
STW.t|Internet Explorer
SCW.c|msctls_
'Locate the Top-Window of the actual selected Window..
GCT.
' Mouse moves just as if we would not have been doing the SCW.
MMV.
Remarks
-
Limitations:
-
See also: