ControlGetFocus
提供: AutoHotkey Wiki
実行制御 | GUI表示 | 演算・変数 | メモリ・DLL操作 | 文字列操作 |
キーボード | マウス | シェル | ウィンドウ | ウィンドウグループ
ステータスバー | コントロール | サウンド | ファイル | INIファイル |
レジストリ | 環境変数 | AutoHotkey | その他 | 設定関係 | オブジェクト
ControlGetFocus[編集]
指定ウィンドウの現在フォーカスを持っているコントロールのClassNNを取得。
ControlGetFocus, OutputVar [,WinTitle, WinText, ExcludeTitle, ExcludeText]
Parameters[編集]
引数名 | 説明 |
---|---|
OutputVar | 結果を格納する変数名。 |
WinTitle | ウィンドウタイトルなど。 ウィンドウ指定の方法参照。 |
WinText | ウィンドウに含まれるテキスト |
ExcludeTitle | 除外タイトル |
ExcludeText | 除外テキスト |
ErrorLevel[編集]
成功すれば 0
、失敗すれば 1
AHKL [v1.1.04+] このコマンドは失敗した場合に例外をスローすることができる。詳細は実行時エラーを参照。
Remarks[編集]
Related[編集]
ControlFocus, ControlMove, ControlClick, ControlGetText, ControlSetText, ControlSend
Example(s)[編集]
ControlGetFocus, OutputVar, Untitled - Notepad If ErrorLevel = 0 MsgBox, Control with focus = %OutputVar% Else MsgBox, The target window doesn't exist or none of its controls has input focus.