Change Stream Deck Profile From Macro

That's definitively on our todo list but we have no ETA yet.

2 Likes

hello, I know it's not the best place but: do you know how to create those "Trigger Apps" on Windows?

Welcome @artwo... so, I don't, but I'm sure there are a couple windows gurus on the forum here somewhere. You might try streamdeck's reddit

would love this too! Just got my hands on a streamdeck

Hi @Timac. Any update on profile switch triggering?

I just bought a nObcontrol primarily for use with Logic Pro, and I've gone down the rabbithole of trying to sync it, to some extent, with Stream Deck, to display plugin parameters.

For anyone interested in this, I'm using @johns' suggestion of triggering profile changes with blank apps. The app is opened according to the result of an OCR scan of the current plugin window (to get the plugin name), so I press one button on the Stream Deck and it loads the appropriate profile for whichever plugin GUI is open. It works very well and I've automated the app and profile creation too, but a native solution would open up a lot more freedom.

As an aside, this also means I have a lot of profiles, so some kind of subfolder system would be very handy!

@noisneil I’ve left Elgato last month so I don't know the future Stream Deck roadmap. To get more info in the future, I would recommend you to contact the Elgato support team.

1 Like

@ncbasic's solution is brilliant, and I've got it working well.

One change I've made is to make the "trigger apps" self-terminate. That way you don't need macros to hunt down each one.

on run
    delay 1
    quit
end run
3 Likes

I made this macro using applescript to switch profiles. Still i would like a better solution build in by Elgato but it does work here.

image
Stream Deck Profile Switcher.kmmacros (5.1 KB)

4 Likes

Nice workaround. I tooled around with something similar a few months ago but found it too intrusive for my particular workflow. But I bet some of the folks here could really benefit from your macro. Thanks for sharing!

By 'intrusive' you mean the screen and menu flicker? yes, i agree, that is visually not very elegant. Elgato should help us here....

1 Like

Yea exactly. Not a huge deal but for some reason it just irritated me :sweat_smile:

I think I’ll finally get around to contacting Elgato to see if they have any plans of implementing switching profiles via AppleScript or Shell commands or the like.

1 Like

It's now 2022, will this be the year Elgato finally gets around to adding this? I wonder if there's a way we could upvote this request somewhere.

In the meantime there are some amazingly clever workarounds here as always, love this community!

1 Like

I don't know if they're going to implement it, but your comment made me realize I still hadn't contacted them about it. But I just did and sent them a link to this thread so they can see that there's some enthusiasm for such a feature.

I imagine it would be fairly easy to do, since they already have the framework for it via their Smart Profiles feature. I imagine it would simply be a matter of allowing external access to whatever code switches the profiles.

But I'm not a programmer so what do I really know? :laughing:

I would love this too! I am a windows user though - was anyone successful with recreating the Trigger Apps workaround on Windows 10?

Welcome Daniel.. and a windows user here.. huh.. :slight_smile: Well, the only thing I can think of is 'Autohotkey', I think each instance of a macro runs as it's own program. Might be worth trying out.

Just an FYI:

I did reach out to Elgato to ask them about implementing this in the future, and they replied today.

You can read more info here:
Elgato's Response to Setting Stream Deck Profiles via Keyboard Maestro or Other Third Party Apps

My workaround: combine two images on one streamdeck button, one bigger than the other, which triggers as usual. Use "Device key + modifier" for the alt.
Screen Shot 2022-04-21 at 16.46.28 PM

I don't see how this is an answer to the original question.

I'd somehow missed that @Fokke had written this neat AppleScript solution and merrily went off down my own rabbit hole implementing this in a similar (if messier) way using Bartender menu bar automation. Still, I enjoyed the journey :laughing:. The resultant macro is over here.

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