Method WinGetClientSizeHeight

AutoIt X

Method Reference


WinGetClientSizeHeight

Retrieves the size of a given window's client area

WinGetClientSizeHeight "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 height of the window's client area
Failure: Returns numeric 1 and sets oAutoIt.error to 1 if windows is not found.

Remarks

If the window is minimized, the returned width and height values are both zero. However, WinGetClientSize works correctly on (non-minimized) hidden windows. If the window title "Program Manager" is used, the function will return the size of the desktop. WinGetClientSize("") matches the active window. If multiple windows match the criteria, the most recently active window is used.

Related

WinGetPosX, WinGetPosY, WinMove

Example


Set oAutoIt = WScript.CreateObject("AutoItX3.Control")

$width = oAutoIt.WinGetClientSizeWidth("")
$height = oAutoIt.WinGetClientSizeHeight("")