Stream Deck — how to update a button by script?

I’m a new Stream Deck user and finding interesting ways to use it. In some cases I’m rolling my own functionality with scripts and would like the script to also be able to communicate back to the Stream Deck to set the button image.

I’ve found various examples of entrire plugins that include button updates and even entire alternative control software, but I’m still looking for a simple* way to script a change to a button image.

Does anyone know of anything I can at least glean the basic technique from? It will need to be something I can call from the command line, passing some kind of reference to the button and an image file.

*I’m reasonably happy to hack away at any technology that is already on my Mac, but would prefer not to have to go down the track of installing something like Node just for this one task.

Oh, and before everyone suggests it: I know Keyboard Maestro has a function to do exactly this (so I know it’s possible!), but I also have no desire to purchase this product to, again, perform one task. I already have Alfred, Automator, Shortcuts, and the Stream Deck itself for automation.

1 Like

If ever you own Bettertouchtool, it has an apple script function to update a trigger properties (anything in the JSON exported by Bettertouchtool).
Since the latest Alpha release, BTT lets you control your Stream deck: BTT triggers are Stream deck buttons.
Using that you should be able to craft something.

1 Like

Thanks. I’ve come very close to buying BTT several times over the years. Maybe this will be the final push I need . :slight_smile:

Check out this article that covers the topic at length !

1 Like

Thanks! When I find the time I’m going to plonk down my readies and get stuck in to BTT.