GroupAdd

提供: AutoHotkey Wiki
移動: 案内検索

実行制御 | GUI表示 | 演算・変数 | メモリ・DLL操作 | 文字列操作 | キーボード | マウス | シェル | ウィンドウ | ウィンドウグループ
ステータスバー | コントロール | サウンド | ファイル | INIファイル | レジストリ | 環境変数 | AutoHotkey | その他 | 設定関係 | オブジェクト

GroupAdd[編集]

ウィンドウの条件をウィンドウグループに追加する。(グループがなければ作られる)

GroupAdd, GroupName, WinTitle [, WinText, Label, ExcludeTitle, ExcludeText]

Parameters[編集]

引数名 説明
GroupName グループ名
WinTitle ウィンドウタイトルなど。
ウィンドウ指定の方法参照。
WinText ウィンドウに含まれるテキスト
Label GroupActivate実行時に条件に一致するウィンドウがなかったときに実行するサブルーチンラベル。
ExcludeTitle 除外タイトル
ExcludeText 除外テキスト

Remarks[編集]

ウィンドウグループを使うと、条件に一致するウィンドウをグループ化し、GroupActivateでそれらを順にアクティブ化することができる。

また、WinMinimize, WinMaximize, WinRestore, WinHide, WinShow, WinClose, and WinKillのコマンドでは、WinTitleに ahk_group GroupNameと指定することで、グループに属する全てのウィンドウをまとめて操作することができる。
他のコマンドでも ahk_groupは使用できるが、条件に一致する最善面のウィンドウのみが対象になる。

Related[編集]

GroupActivate, GroupDeactivate, GroupClose

Example(s)[編集]

; In the autoexecute section at the top of the script:
SetTitleMatchMode, 2
GroupAdd, MSIE, - Microsoft Internet Explorer ; Add only a single window to this group.
Return ; End of autoexecute section.
; Assign a hotkey to activate this group, which traverses
; through all open MSIE windows, one at a time (i.e. each
; press of the hotkey).
Numpad1::
GroupActivate, MSIE, r
; Here's a more complex group for MS Outlook 2002.
; In the autoexecute section at the top of the script:
SetTitleMatchMode, 2 
GroupAdd, mail, Message - Microsoft Word ; This is for mails currently being composed
GroupAdd, mail, - Message ( ; This is for already opened items
; Need extra text to avoid activation of a phantom window:
GroupAdd, mail, Advanced Find, Sear&ch for the word(s)
GroupAdd, mail, , Recurrence:
GroupAdd, mail, Reminder
GroupAdd, mail, - Microsoft Outlook
Return ; End of autoexecute section.
Numpad5::GroupActivate, mail ; Assign a hotkey to traverse through the group.