WinGetActiveStats

Combines the functions of WinGetActiveTitle and WinGetPos into one command.

WinGetActiveStats, OutTitle, OutWidth, OutHeight, OutX, OutY

Parameters

OutTitle

The name of the variable in which to store the title of the active window.

OutWidth, OutHeight

The names of the variables in which to store the width and height of the active window.

OutX, OutY

The names of the variables in which to store the X and Y coordinates of the active window's upper left corner.

Remarks

If no matching window is found, the output variables will be made blank.

This command is equivalent to the following sequence:

WinGetTitle, OutTitle, A
WinGetPos, OutX, OutY, OutWidth, OutHeight, A

If the active window is a hidden window and DetectHiddenWindows is off (the default), all commands except WinShow will fail to "see" it. If there is no active window for this reason or any other, this command will set all of its output variables to be blank.

WinGetPos, WinGetActiveTitle, WinGetTitle, WinGetClass, WinGetText, ControlGetText

Examples

Retrieves and reports the title, size and position of the active window.

WinGetActiveStats, Title, Width, Height, X, Y
MsgBox, The active window "%Title%" is %Width% wide`, %Height% tall`, and positioned at %X%`,%Y%.