One of the excellent features coming to Shortcuts for Mac is the addition of a scripting capability for the Shortcuts app itself – Apple has added AppleScript support for commands like opening and running shortcuts, even without opening the app at all.
Naturally, I immediately got excited to bring this possibility to life using the Stream Deck, a USB device from Elgato with hardware keys that can be customized to your heart’s extent (including using folders and subfolders):
The Stream Deck software for Mac allows users to add third-party plugins offered by the community, including one such plugin called “Run OSA script” that lets users input a script that gets triggered when the button is pressed:
To take advantage of this plugin, I’d need to write my own AppleScript – something I’m not super familiar with.
Thanks to this tweet from Alex Hay, developer of Toolbox Pro, I knew to use the Script Editor app to look into the capabilities of Shortcuts app by examining its’ AppleScript dictionary – here’s how: