Retrieve the caption of a dialog box or the text of a dialog box item. The text is stored in an environment variable called GETTEXT.
GETTEXT dlg_id [id]
dlg_id Specifies the identifier of the dialog box that contains the item. id Specifies the identifier of the item.
The text for any type of item (that has a caption or text) may be retrieved. For example, a list box requires the use of the LBGET and LBTEXT commands to retrieve the text of the currently selected item in the list box.
When parameter id is not specified then the caption of the dialog box is returned.
Also see command SETTEXT.