Last week Audio Hijack 4 arrived, and was I excited about its automation features. I had several people ask me about a simple automation I created, which generates a single button on a Stream Deck that toggles recording on and off and changes its display based on recording status.
I wish it didn’t, but (at least for now) the only way to control the appearance of a Stream Deck button via automation tool involves Keyboard Maestro. So to make this automation work, I have to create a shortcut, and then run that shortcut from within Keyboard Maestro.
First, the shortcut:
This is pretty straightforward. There’s a single line of JavaScript that determines if my session, “Podcast lossless,” is running:
``` return (app.sessionWithName('Podcast lossless').running)
```
If the result is false, the session is not running. The shortcut turns it on. Otherwise, the session is running, and the shortcut turns it back off. In either case, the shorcut then uses the new “stop and output” feature of Shortcuts to output that same result. This is what Keyboard Maestro will use to do its thing.
Here’s the Keyboard Maestro macro:
The macro is executed by a Keyboard Maestro action on the Stream Deck, on a button with a particular ID—in my case, its R2C3, but it can be just about anything.…