GroupDeactivate

Similar to GroupActivate except activates the next window not in the group.

GroupDeactivate GroupName , Mode

Parameters

GroupName

Type: String

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

Mode

Type: String

If omitted, the function activates the oldest non-member window. To change this behavior, specify the following letter:

R: The newest non-member window (the one most recently active) is activated, but only if a member of the group is active when the function 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.

Remarks

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

This function is useful in cases where you have a collection of favorite windows that are almost always running. By adding these windows to a group, you can use GroupDeactivate to visit each window that isn't one of your favorites and decide whether to close it. This allows you to clean up your desktop much more quickly than doing it manually.

GroupDeactivate selects windows in a manner similar to the Alt+Shift+Esc system hotkey. Specifically:

Although the taskbar is skipped due to the WS_EX_TOPMOST style, it is activated if there are no other eligible windows and the active window matches the group.

See GroupAdd for more details about window groups.

Related

GroupAdd, GroupActivate, GroupClose

Examples

#1

GroupDeactivate "MyFavoriteWindows"  ; Visit non-favorite windows to clean up desktop.