The WindowEx.GetWindowText function Returns the text of the specified window's title bar.
string WindowEx.GetWindowText(
number hWnd, --handle of window or control with text
number nMaxCount --max caption size
);
Parameters
hWnd
Identifies the window or control containing the text.
nMaxCount
Specifies the maximum number of characters to return. If the text exceeds this limit, it is truncated.
Return Values
If the function succeeds, the return value is title of specified window
if function fails return value is nil
Remarks
This function cannot retrieve the text of an edit control in another application.