Returns the text of the control specified by ClassName and Instance on the window specified by WindowTitle.


Result contains the text of the control if found.  It the window is not found Result contains ##NOSUCHWINDOW##.  If the class and instance was not found ##NOSUCHOBJECT## is returned.


If WIN_USEHANDLE is set to 1 WindowTitle must be a window handle.


To determine class names of objects on windows use View System Windows.  A window may contain several objects of the same class name.  Instance is used to determine which instance of the class to use.

GetControlText retrieves the published text property of the specified object.  Not all text that you see on the screen is retrievable in this way.  Some text is painted via lower level routines and some text is graphical.  Some objects, such as labels, are not windowed controls, and therefore text associated with them cannot be retrieved with GetControlText.   Try the new GetTextAtPoint, GetTextInRect and GetWindowTextEx commands which use lower level hooks to trap more text.


Abbreviation: GCT

See also: SetControlText, GetTextAtPoint, GetTextInRect, GetWindowTextEx, WaitScreenText, GetTextPos






npEdit will now contain the contents of the notepad edit window.