AnyWin class.
sCaption = object.GetCaption ([bRawMode, bNoStaticText])
Variable | Description |
---|---|
sCaption | The object's caption. STRING. |
bRawMode |
Optional: BOOLEAN.
The Open Agent always uses FALSE for this value regardless of what is specified in the script. The returned strings include trailing and leading spaces but ellipses, accelerators, and hot keys are removed. |
bNoStaticText |
Optional: BOOLEAN.
The Open Agent always uses FALSE for this value regardless of what is specified in the script. Note: This argument is not supported with Version 4.0 Agents.
|
If the application does not explicitly associate a label with the object, GetCaption returns the closest static text above or to the left of the object unless bNoStaticText is TRUE, in which case GetCaption returns the empty string. For example, the caption could be the title of a dialog box, the text on a pushbutton, or the static text closest to a text box. If there is no static text, the function returns an empty string ("").
When bRawMode is TRUE, the returned string includes any trailing and leading spaces, trailing ellipses, and embedded accelerator characters. These additional characters make the strings platform-specific. When bRawMode is FALSE, the output of GetCaption does not include any special characters.
STRING sTitle sTitle = PushButton.GetCaption()