GroupActivate - Syntax & Usage | AutoHotkey

AutoHotkey

GroupActivate

Activates the next window in a window group that was defined with GroupAdd.

GroupActivate, GroupName , R

Parameters

GroupName

The name of the group to activate, as originally defined by GroupAdd.

R

This determines whether the oldest or the newest window is activated whenever no members of the group are currently active. If omitted, the oldest window is always activated. If it's the letter R, the newest window (the one most recently active) is activated, but only if no members of the group are active when the command is given. "R" is useful in cases where you temporarily switch to working on an unrelated task. When you return to the group via GroupActivate, GroupDeactivate, or GroupClose, the window you were most recently working with is activated rather than the oldest window.

ErrorLevel [AHK_L 54+]

ErrorLevel is set to 1 if no window was found to activate or 0 otherwise.

Remarks

This command causes the first window that matches any of the group's window specifications to be activated. Using it a second time will activate the next window in the series and so on. Normally, it is assigned to a hotkey so that this window-traversal behavior is automated by pressing that key.

When a window is activated immediately after another window was activated, task bar buttons may start flashing on some systems (depending on OS and settings). To prevent this, use #WinActivateForce.

See GroupAdd for more details about window groups.

Related

GroupAdd, GroupDeactivate, GroupClose, #WinActivateForce

Example

GroupActivate, MyGroup, R