organize AutoHotKey code by app instead of key?

is there a way to organize ahk code so that it's grouped by application instead of keys?

for example, here's one block of code from my ahk script. It sets the * key on numpad, what it actually do depends on which app is front.

;;; make the numpad star “*” key to do next tab
WinGet, myProcName, ProcessName, A
If (WinActive("ahk_class Second Life") Or WinActive("ahk_class Vertical Life") )
Send !{Right}
Else If (WinActive("ahk_class Emacs")
Or WinActive("ahk_class Chrome_WindowImpl_0")
Or WinActive("ahk_class MozillaUIWindowClass")
Or WinActive("ahk_class gdkWindowToplevel") )
Send ^{PgDn}
Else If (WinActive("ahk_class IEFrame")
Or WinActive("ahk_class OpWindow")
or (myProcName = "safari.exe") )
Send ^{Tab}
Else {
Send {NumpadMult}

so my ahk script is a bunch of such blogs.
It is easy to find all the definitions of a given key, but i'd like to find all hotkeys of a given app.


xah's ahk tutorial

post url http://www.autohotkey.com/forum/viewtopic.php?p=355260

No comments:

Post a Comment