How to Hide Notes application
By TJ Forman @TJ_Forman
Trying to get sound flow to "Hide Notes". the note taking native application on the Mac. I've successfully used two different methods on 5-7 other applications and they all work fine.
However when I try and do what works in other application in notes, the macro doesn't work when exectuted from Stream Deck. However the macro does work if I execute it from the F6 hot key I've assigned it to.
In the images below there are two methods I've used to hide applications



- Nathan Salefski @nathansalefski
I actually made something today that I think would be handy for this situation:
- If your Notes app isn't running, it will be launched
- If your Notes app is running but not in the foreground, it will bring it front
- If your Notes app is running and in the front, it will hide it
All with one press of a button. Easily transferrable to all your other apps
//Define App Name const appName = 'Notes'; //Define UI Element const isAppRunning = sf.ui.app("com.apple.Notes").mainWindow.exists //Determine App is Frontmost Running const isAppFrontmost = sf.ui.frontmostApp.uiElement['Title'] === appName; //Task: switch (true) { case (!isAppRunning): //Launch App sf.app.launch({path: "/System/Applications/Notes.app",}); break case (isAppRunning && !isAppFrontmost): //Activate Main Window sf.ui.app("com.apple.Notes").appActivateMainWindow(); break case (isAppRunning && isAppFrontmost): //Hide App sf.ui.app("com.apple.Notes").menuClick({ menuPath: ['Notes', 'Hide Notes'] }); break };