Here is the latest version of an ahk script I call "metagroup". What it does is this. You use the combos, ctrl+numpad1-3 to move among groups of things.

In this case, ctrl+numpad1 (tapped repeatedly) cycles through all your open text files (or text related: Word and WordPad e.g.). Notepad, MetaPad, NotePad++, and a secure-notes program called LockNote are *also* grouped in the "texts" category. Some of these programs won't be on your system, and so won't apply to you.

Ctrl+numpad2 cycles through all "folders"-related items including single folders, Explorer dual-panes, Xplorer², Q-Dir (if you have that program on your system), and Everything Search (again, if you use that tool for local searches).

Advertisement

Ctrl+numpad3 (again, tapped repeatedly) goes through all programs grouped under "browsers". For this script, Firefox, IE, Chrome, and Opera are the switchables.

Finally, Ctrl+numpad4-6 close down all "texts", "folders", and "browsers" respectively. For "texts", you are prompted to save your work if you haven't save the latest changes.

Advertisement

Of course you can change the key combinations, add to the groups, take some away, and make groups of your own. E.g. You could have a group called "media", under which might reside Winamp, Media Player, VLC, Foobar, etc. You would tap their combo repeatedly to switch among them, or tap another combo to shut them all down at once. What you'd want that for, is hard to say, but who knows.

Advertisement

Along with Autohotkey itself, you will want to use its "spy" tool to find what active-window names and or titles your programs report to AHK. Those names you would then use when you add them to a group.

There is much more on using "groups" in Autohotkey here:

http://www.autohotkey.com/docs/commands/…

Script follows:

Advertisement

<————————————————————————————->

#NoEnv

Advertisement

SendMode Input

SetWorkingDir %A_ScriptDir%

#SingleInstance force

Advertisement

Advertisement

SetNumLockState, AlwaysOn

DetectHiddenWindows, off

Process, Priority, , High

Advertisement

GroupAdd, texts, ahk_class metapad

GroupAdd, texts, ahk_class Notepad

Advertisement

GroupAdd, texts, ahk_class Notepad++

Advertisement

GroupAdd, texts, ahk_class WordPadClass

GroupAdd, texts, ahk_class OpusApp ; Word

GroupAdd, texts, ahk_class ATL:0044B1A0 ; LockNote

Advertisement

GroupAdd, folders, ahk_class ATL:ExplorerFrame ; Xplorer²

Advertisement

GroupAdd, folders, ahk_class CabinetWClass ; folder

GroupAdd, folders, ahk_class EVERYTHING ; Everything Search

Advertisement

GroupAdd, folders, ahk_class ATL:0000000140122AE0 ; Q-Dir

GroupAdd, browsers, ahk_class MozillaWindowClass ; Firefox/Seamonkey

GroupAdd, browsers, ahk_class IEFrame ; Internet Explorer

Advertisement

Advertisement

GroupAdd, browsers, ahk_class Chrome_WidgetWin_1 ; Chrome

GroupAdd, browsers, ahk_class Chrome_WidgetWin_0 ; Opera

return

Advertisement

; Assign hotkeys to activate these groups, which will cycle

; through all open instances of metapad/notepad/notepad++,

Advertisement

; Word, folder windows, and Firefox/IE/Chrome/Opera browsers, one at a time

Advertisement

; (i.e. at each press of their respective hotkey). Control

; plus a number-pad key are used in this example.

#WinActivateForce ; see here http://www.autohotkey.com/docs/commands/…

Advertisement

~$^numpad1::GroupActivate, texts, r ; go through opened text files

Advertisement

~$^numpad2::GroupActivate, folders, r ; go through opened folders

~$^numpad3::GroupActivate, browsers, r ; go through opened browser windows

Advertisement

; close all text files, all folders, and all instances

; of IE, Firefox, Chrome, and Opera.

~$^numpad4::

Advertisement

Advertisement

GroupClose, texts , A

return

~$^numpad5::

Advertisement

GroupClose, folders , A

return

Advertisement

~$^numpad6::

Advertisement

GroupClose, browsers , A

return

<————————————————————————————->