The WindowEx.GetWindowRect function retrieves the dimensions of the bounding rectangle of the specified window. The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen.
table WindowEx.GetWindowRect(
number hWnd --handle of window
);
Parameters
hWnd
Identifies the window.
Return Values
If the function succeeds, the return value is table containing bounding rectangle of specified window
result = WindowEx.GetWindowRect(Application.GetWndHandle());
left = result.Left;
top = result.Top;
right = result.Right;
bottom = result.bottom;
If the function fails, the return value is nil
if result ~= nil then
--do anything here
end