Function Reference


StatusbarGetText

Retrieves the text from a standard status bar control.

StatusbarGetText ( "title" [, "text" [, part = 1]] )

Parameters

title The title/hWnd/class of the window to check.
text [optional] The text of the window to check. Default is an empty string.
part [optional] The "part" number of the status bar to read - the default is 1. 1 is the first possible part and usually the one that contains the useful messages like "Ready" "Loading...", etc.

Return Value

Success: the text read.
Failure: "" (empty string) and sets the @error flag to 1 if no text could be read.

Remarks

This functions 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 which StatusbarGetText() cannot read. For example, StatusbarGetText does not work on the program TextPad; however, the first region of TextPad's status bar can be read using ControlGetText("TextPad", "", "HSStatusBar1")
StatusbarGetText() can work on windows that are minimized or even hidden.

Related

ControlGetText, ControlCommand

Example

#include <MsgBoxConstants.au3>

AutoItSetOption("WinTitleMatchMode", 2)

Local $sText = StatusbarGetText("Internet Explorer")
MsgBox($MB_SYSTEMMODAL, "", "Internet Explorer's status bar says: " & $sText)