An Audio Hijack 4 automation switches blocks on and off and starts a session.Rogue Amoeba’s Audio Hijack 4 is here, and while it’s got a bunch of interesting new features, my favorite is its support for automation via JavaScript and Shortcuts. While not quite everything in Audio Hijack is controllable (yet), most of it is—and it leads to some really interesting possibilities for users.

Audio Hijack can be controlled by scripts saved within the app itself (the app includes several built-in scripts as samples, and more are available on Rogue Amoeba’s website), via scripts saved as .ahcommand text files on your Mac, and via scripts sent directly from Shortcuts. Individual Sessions can run scripts via the new Scripting tab in each session; automations can fire off when a recording, session, or timer stops or starts. One script provided by Rogue Amoeba, Discard Small Files, will delete any recording less than five seconds in length. It’s a perfect match for the Session Stop event.

But Audio Hijack really unfolds when you integrate it with Shortcuts. Right now, the app provides three Shortcuts actions: Run a Script, Run JavaScript, and Run/Stop Session. Run a Script will run a script stored within the Audio Hijack app; Run JavaScript will run a script passed to the app from the shortcut, and Run/Stop Session lets you turn a particular session on or off.…