Hello folks
BTT is cool, I however struggle on something that (I think) should be simple:
"To display a certain item on Touchbar conditionally to if an App is open/closed".
Let me explain this with an example:
- I use 3 Apps on my Mac
- 2 Of them are open (on different workspaces/screens)
- The 3rd App is closed (it simply does not run, I would have to open it if I would want to use it).
I would like to show a certain set of buttons (or just one button) ONLY if the 3rd App is running - anywhere on my Mac, no matter if is the "active" app or not.
I cannot succeed. I tried an apple script to check the running processes, but this either will display the widget only if the App is active or always.
Neither is what I want anyway; I need an entire Button (or group of) that has some actions connected to it to display on Touchbar only if that specific App runs somewhere on my Mac.
This is like having a "Write Email" button, which shows only if Mail is open (but not necessarily active/under cursor), but in global (everywhere) on touch bar.
Any hint is highly welcomed
The closest I got:
An apple script widget with:
set targetApp to "MAMP PRO"
tell application "System Events"
set processExists to exists process targetApp
end tell
if processExists is true then
return "{"text":"newTitle"}"
else
return
end if
This, however, shows the widget ONLY on active MAMP PRO app screen
I would need it to show on all the screens as well; the app is running!