Remarks

WinGetPos() returns negative numbers such as -32000 for minimized windows, but works fine with (non-minimized) hidden windows.
If the window title "Program Manager" is used, the function will return the size of the desktop. If multiple windows match the criteria, the most recently active window is used.

Related

Example

#include<MsgBoxConstants.au3>Example()Func Example(); Retrieve the position as well as height and width of the active window.Local$aPos=WinGetPos("[ACTIVE]"); Display the array values returned by WinGetPos.MsgBox($MB_SYSTEMMODAL,"","X-Pos: "&$aPos[0]&@CRLF&_"Y-Pos: "&$aPos[1]&@CRLF&_"Width: "&$aPos[2]&@CRLF&_"Height: "&$aPos[3])EndFunc;==>Example