Change Stream Deck Profile From Macro

So, ignore my previous post - I'm now all in on the @ncbasic/@johns/@noisneil ingenious dummy app method :rofl: And apologies if I'm over-extending this old thread with a slightly different solution to something that's effectively a solved problem.

I've created a subroutine to compile (using osacompile) and run a uniquely-named AppleScript app which stays open for 2s (long enough for the Stream Deck app-based trigger to notice) and then quits itself (so there's no need for the KM macro to quit it).

I found I needed separate apps with unique names/bundle IDs for the Stream Deck to recognise them as distinct per profile, so creating unique apps on the fly seemed easier. They do of course still needed to be manually assigned to each of the Stream Deck profile(s) they need to trigger (I wasn't sure hacking them into the Stream Deck profile's manifest file was wise!).

Trigger a Stream Deck profile

Download the "Trigger a Stream Deck profile" subroutine (14 KB)

Show the macro

The subroutines it calls are all in this other post with the exception of these ones:

Check Stream Deck is installed, running, and hidden

Download the "Check Stream Deck is installed, running, and hidden" subroutine (7.5 KB)

Show the macro

Construct folder path in my iCloud folder (creating required subfolders)

I store some app-specific content in my iCloud folder. This subroutine is used to create any subfolders inside it.

Download the "Construct folder path in my iCloud folder (creating required subfolders)" subroutine (3.8 KB)

Show the macro

Construct folder path in my Apps/application folder

I store most of my KM data (images, dummy apps etc) in subfolders of my iCloud/Apps/Keyboard Maestro/ folder.

Download the "Construct folder path in my Apps-application folder" subroutine (3.5 KB)

Show the macro

2 Likes