StatusBarGetText
Retrieves the text from a standard status bar control.
OutputVar := StatusBarGetText(Part#, WinTitle, WinText, ExcludeTitle, ExcludeText)
Function Example: text := StatusBarGetText(1, "A")
Parameters
- OutputVar
The name of the variable in which to store the retrieved text.
- Part#
Which part number of the bar to retrieve. Default 1, which is usually the part that contains the text of interest.
- WinTitle
A window title or other criteria identifying the target window. See WinTitle.
- WinText
If present, this parameter must be a substring from a single text element of the target window (as revealed by the included Window Spy utility). Hidden text elements are detected if DetectHiddenText is ON.
- ExcludeTitle
Windows whose titles include this value will not be considered.
- ExcludeText
Windows whose text include this value will not be considered.
ErrorLevel
ErrorLevel is set to 1 if there is a problem or 0 otherwise. If there was a problem, OutputVar is also made blank.
Remarks
This command attempts to read the first standard status bar on a window (Microsoft common control: msctls_statusbar32). Some programs use their own status bars or special versions of the MS common control, in which case the text cannot be retrieved.
Rather than using this command in a loop, it is usually more efficient to use StatusBarWait, which contains optimizations that avoid the overhead of repeated calls to StatusBarGetText.
Window titles and text are case sensitive. Hidden windows are not detected unless DetectHiddenWindows has been turned on.
Related
StatusBarWait, WinGetTitle, WinGetText, ControlGetText
Example
StatusBarGetText, RetrievedText, 1, Search Results if InStr(RetrievedText, "found"), MsgBox("Search results have been found.")