StatusBarWait

ステータスバーの内容が指定したテキストにマッチするようになるまで待機

StatusBarWait [, BarText, Seconds, Part#, WinTitle, WinText, Interval, ExcludeTitle, ExcludeText] 

Parameters

引数名説明
BarText テキストを指定。大文字小文字は区別される。SetTitleMatchModeで指定したマッチ方式(前方一致や中間一致など)で判別される。
Seconds 何秒間まで待つか。省略時は無限に待つ。「0」を指定すると、0.5秒待つ。
Part# 何番目の区切りを対象とするか。デフォルトは「1」。
WinTitle ウィンドウタイトルなど。
ウィンドウ指定の方法参照。
WinText ウィンドウに含まれるテキスト
Interval 何ミリ秒間隔でタイトルをチェックするか。デフォルトは「50」。
ExcludeTitle 除外タイトル
ExcludeText 除外テキスト

ErrorLevel

0
ステータスバーの内容が指定したテキストに一致するようになった
1
ステータスバーの内容が指定したテキストに一致するようになる前にSecondsで指定した時間が経過した
2
ステータスバーにアクセスできなかった

Remarks

Delphi製アプリケーションなどの特殊な仕様のステータスバーのテキストは取得できない。

待機中はホットキーやタイマーなどで起動されたスレッドが割り込める。

Related

StatusBarGetText, WinGetTitle, WinGetText, ControlGetText

Example(s)

IfWinExist, Search Results ; Sets the Last Found window to simplify the below.
{
	WinActivate
	Send, {tab 2}!o*.txt{enter}
	Sleep, 400  ; Give the status bar time to change to "Searching".
	StatusBarWait, found, 30
	if ErrorLevel = 0
		MsgBox, The search successfully completed.
	else
		MsgBox, The command timed out or there was a problem.
}