Retrieves the position and size of a given window.
WinGetPosWidth "title" [, "text"]
Parameters
title | The title of the window to read. |
text | [optional] The text of the window to read. |
Return Value
Success: | Returns the width of the window. |
Failure: | Returns numeric 1 and sets oAutoIt.error to 1 if windows is not found. |
Remarks
WinGetPos returns negative numbers such as -32000 for minimized windows, but works fine with (non-minimized) hidden windows.
Related
WinGetClientSize, WinMove
Example
Set oAutoIt = WScript.CreateObject("AutoItX3.Control")
x = oAutoIt.WinGetPosX("")
y = oAutoIt.WinGetPosY("")
width = oAutoIt.WinGetPosWidth("")
height = oAutoIt.WinGetPosHeight("")