Method StatusbarGetText

AutoIt X

Method Reference


StatusbarGetText

Retrieves the text from a standard status bar control

StatusbarGetText "title" [, "text" [, part]]

Parameters

title The title of the window to check.
text Optional: The text of the window to check.
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: Returns the text read.
Failure: Returns empty string and sets oAutoIt.error 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, StatusbarText 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

ControlCommand, ControlGetText

Example


Set oAutoIt = WScript.CreateObject("AutoItX3.Control")

oAutoIt.AutoItSetOption("WinTitleMatchMode", 2)
text = oAutoIt.StatusbarGetText "Internet Explorer"
WScript.Echo "Internet Explorer's status bar says: " & text