<< Click to Display Table of Contents >> Navigation: 3. Script Language > Window Operations > Window Operations |
MiniRobotLanguage (MRL)
GWP. Command
Get Window Position and Size
Intention
The GWP.-Command can be used to get the position or the size of the actual selected Top- or Child-Window.
The window position is been calculated from the top-left corner of the window or child-window. To change window-position and size, use SWP. - Set Window Position and Size
Syntax
GWP.[P1][,P2][|P3][,P4][|T]
Parameter Explanation
P1 - Left-Position
P2 - Top-Position
P3 - X-Size
P4 - Y-Size
T - if used, the Top_window of the actual selected Window is taken, no matter
if a Top- or a child-Window is the actual located window.
You can omit any of the Parameters.
In that case the results will be placed on the stack in the following Order:
TOS: §§000 - Window-Centerpoint, X - Coordinate
§§001 - Window-Centerpoint, Y - Coordinate
§§002 - Window- Upper, left Corner, X - Coordinate
§§003 - Window- Upper, left Corner, Y - Coordinate
§§004 - Window-Size, X
§§005 - Window-Size, Y
§§006 - Window- Lower, right Corner, X - Coordinate
§§007 - Window- Lower, right Corner, Y - Coordinate
Example
'*********************************************
' GWP. Sample 2
'*********************************************
'
STW.ct|PBWindowClass:0|BCS - Testform
'SCW.t|Next
SWP.0,0|640,400
GWP.$$XPO,$$YPO|$$XSZ,$$YSZ
STS.DUMP
MBX.$$XPO,$$YPO-$$XSZ,$$YSZ
ENR.
'*********************************************
' GWP. Sample 2
'*********************************************
STW.c|ieframe
' The window is moved to position 0,0|640,400
' and resized to 640x400
SWP.0,0|640,400
GWP.$$XPO,$$YPO|$$XSZ,$$YSZ
PRT. The location and size of the located IE-Window is:
PRT. $$XPO,$$YPO - $$XSZ,$$YSZ
END.
' More Examples
' The window is resized to 500x500 pixel
GWP.|$$XSZ,$$YSZ
' The window is resized to 200x200 and vertically moved to y=300
GWP.,$$YPO|$$XSZ,$$YSZ
' The window is only moved, not resized.
GWP.$$XPO,$$YPO
Remarks
-
Limitations:
-
See also:
• SWP. - Set Window Position and Size