GroupActivate

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

GroupActivate, GroupName , Mode

Parameters

GroupName

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

Mode

If blank or omitted, the command activates the oldest window in the series. Otherwise, specify the following 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 one 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.

In v1.1.34 and older, each window specification is evaluated one at a time, in the order that they were added to the group by GroupAdd. Mode affects the order of activation only within each window specification, not across the entire group.

[v1.1.35+]: Each window is evaluated against the window group as a whole, without distinguishing between window specifications. Mode affects the order of activation across the entire group.

When a window is activated immediately after the activation of some other window, task bar buttons might start flashing on some systems (depending on OS and settings). To prevent this, use #WinActivateForce.

See GroupAdd for more details about window groups.

GroupAdd, GroupDeactivate, GroupClose, #WinActivateForce

Examples

Activates the newest window (the one most recently active) in a window group.

GroupActivate, MyGroup, R