Dlovell > 2025-11-17 18:20
Jean Lalonde > 2025-11-18 14:16
![[Image: Fo9neUo.png]](https://i.imgur.com/Fo9neUo.png)
Jean Lalonde > 2025-11-18 14:16
Xavier > 2025-11-19 03:17
Q_A_Pro() ;; this is in the autoEXE area of my script so I can use it in hotkeys, menus and guis...
{
If (IsLL)
Tip("* Loading... Q_A_Pro()")
global Q_Pro := ""
Loop {
IniRead, line, %qini%, Favorites, Favorite%A_Index%
if (line = "ERROR" || line = "")
break
StringSplit, parts, line, |
FavoriteType := parts1
FavoriteName := parts2
if (FavoriteType = "Menu" && FavoriteName != "") {
Q_Pro .= (Q_Pro = "" ? "" : "`n") . Trim(FavoriteName)
}
}
; box(q_pro)
}
;; and this is a couple examples of how I call QAP to show me dynamic menus based on the active app.
;; complete with my debugging comments calling tooltips and msgbox cause this was a little tricky to figure out.
Capslock & q:: ;; Caps+, show live QAP %a_program% menu
QAPOpenAppNotesMenuViaTyporaDoc:
global obsanx_filepath := ""
global typopath := ""
if WinActive("ahk_exe Typora.exe")
{
WinGetTitle, TypoTit, A
typopath := RegExReplace(typotit, " - Typora", "")
if FileExist(typopath)
{
SplitPath, typopath,,typodir,,typostem
; tooltip wtf ahk typo is active`n typostem= %typostem%`n`n typordir=%typo% anxdir=%AppNotesDir%`n%q_pro%
if (typodir = AppNotesDir)
{
typoif := typostem ".exe"
if InStr(q_pro, typoif)
{
; tip("q_pro=" q_pro "`nTypoIf=" typoif "typostem=" typostem, 7000)
run, %qapm% LaunchFavorite "> If > %typoif%"
}
else
run, %qapm% LaunchFavorite "> If > Typora.exe"
}
else
run, %qapm% LaunchFavorite "> If > Typora.exe"
}
else
{
run, %qapm% LaunchFavorite "> If > Typora.exe"
; tooltip %qapm%`ntp:%typopath%
}
return
}
if WinActive("ahk_exe Obsidian.exe")
{
gosub GetActiveFilePathFromObsidianTitleBar
splitpath, obsanx_filepath,,,,obsanx_stem
obsif := obsanx_stem ".exe"
; tooltip your are here %obsanx_filepath%`nobstit=%OBSTitle%`n`noif=%obsif%
if InStr(q_pro, obsif)
run, %qapm% LaunchFavorite "> If > %obsif%"
else
run, %qapm% LaunchFavorite "> If > Obsidian.exe" ; gosub QAPLiveMenu
return
}
else
{
; box("else=`n " A_linefile "at line=" A_linenumber "`n wft ahk #3`ngosub qaplivemenu`%A_linenumber`%: ")
gosub QAPLiveMenu
}
return
ShowQAPif:
QAPLiveMenu:
winget, A_Pro, processname, A
; WinGetTitle, A_Title, A
; box(A_pro)
; if (A_Title = "- Do X -")
; {
; Run, %QAPm% LaunchFavorite "> If > -x DASH x-"
; return
; }
; if (A_Title = "-x DASH x-")
; {
; Run, %QAPm% LaunchFavorite "> If > %A_Title%"
; return
; }
if WinActive("ahk_exe AnyDesk.exe") || WinActive("ahk_exe steamwebhelper.exe") || WinActive("ahk_exe SteamLink.exe") || WinActive("ahk_exe Yuzu.exe") || WinActive("ahk_exe Ryujinx.exe")
{
Run, %QAPm% LaunchFavorite "> Gaming"
return
}
; box("A_pro=" A_pro)
; Box(QAPm " LaunchFavorite "> If > " A_Pro "`n a motherfucking line number=" A_LineNumber ", 4)
; Box("A_linefile=" A_linefile "`n A_linenumber=" A_linenumber , 4)
; box("run, " qapm " LaunchFavorite > if > " A_pro , 4 )
Run, %QAPm% LaunchFavorite "> If > %A_Pro%"
; Run, "C:\Program Files\Quick Access Popup\QAPmessenger.exe" LaunchFavorite "> Sub1 > Sub2 > FavName" ;; example from help
return