I came up with a way to call program specific menus through AHK && QAP for my most used\favorite applications.
Retirements: having AutoHotkey installed and running your own scripts to call upon QAP via QAPMessenger.exe
I discovered AHK a 1.5 years ago and while I'm no where near the programmer that Jean is I'm learning and loving AHK awesome power when it comes to creating dynamic menus, escpeically when you start processing what's happing on screen via the active app or clipboard content, etc.
i don't think this "If (ThisRule)" is as widely available in QAP?? its is in some cases (such as filtering content by name or ext in live menus or excluding hotkey from certain apps). i don't think I've seen any "only show this item when that rule is met." QAPs Code is complex and i wouldn't know where to being to add it if i were in jeans shoes.
So what am I doing and how?
Lets start in QAP...
#1 I made a sub menu called " If ". (easy name to remember with ahk, for organization, ill keep app related keys and functions in there own files 'If MusicBee.ahk') This sub-menus is Filled with Submenus. One for each of my Fav apps. The names of the sub menus match the name of its executable, including the .exe*
This name is important for the next step! Use window spy to get the full name of the .exe. On the QAP side my menu(s) setup looks like this example...
Main > If > MusicBee.exe > and
Main > If > NotePad++.exe > and so on.
Now i have dedicated submenu for my fav programs that i use daily. inside of which i have the usual.. live folders, links (web and local folders), readme reference docs for the programs CLI, settings files, etc etc all related to that one app. simple enough in QAP...
but the real magic of having a single hotkey that will show the matching app menu automatically without jumping through submenus is the icing on the cake.
#2 In my AutoHotkey Script i came up with Hotkey that will look for the name of Executable that is active. in this example, ahk_exe
MusicBee.exe . This variable could match any one of the 12+ app submenus I created. AHK will then send the %variable% through the CLI to QAP, which will see it and open the matching menu. thanks to way Jean has set up calling a submenus from QAPMenssenger this is seamless with four lines of code in autohotkey.
the code is ...
Code:
F1:: ; example hotkey, make it your own.
WinGet, A_Process, ProcessName, A
Run "C:\Program Files\Quick Access Popup\QAPmessenger.exe" LaunchFavorite "> If > %A_Process%"
Return
that AHK variable ProcessName returns (or sends) the name name of the exe to QAP. e.g. MusicBee.exe, Notepad++.exe, Flow.Launcher.exe, etc. so as long as the
sub-menu name matches the name of the executable QAPm will see and match what AHK is sending and now I (and you could) have 1 single hotkey, sent from AHK, that will open a different application specific menu via QAP!
Switch the active app, same hotkey, different App = different menu!!!
I love it!
I'm a little surprised it worked so seamlessly on the first try!!
additional AHK code notes...
I have QAPM set as a variable in my script so run lines looks even cleaner.
in the autoexe heading of the script i have...
global QAPm := "C:\Program Files\Quick Access Popup\QAPmessenger.exe"
and then the run line...
Run, %QAPm% LaunchFavorite "> If > %A_Process%"