Would it have been simpler if the Shortcuts plugin for Stream Deck supported this natively? Sure. So I wired my Stream Deck button up to this one-line AppleScript script: tell application "Shortcuts Events" to run the shortcut named "Podcast Note" with input "cough" It lets you run shortcuts from any AppleScript script, without launching the Shortcuts app. Shortcuts Events is completely invisible, and always available. One of the many ways you can activate Shortcuts on the Mac involves using a system app provided by Apple called Shortcuts Events. This is what I mean by getting around roadblocks. I ended up using the Run OSA Script Stream Deck plugin to activate my shortcut… via AppleScript. The current Stream Deck plugin for Shortcuts doesn’t let you pass input on to the Shortcut, which is how I pass text to my note script. Yesterday (and I swear this is not going to turn into yet another post about that podcast note script Dan and I keep bashing around) I decided that there was a feature I could more easily implement in Shortcuts… but that meant that I would need to abandon my original AppleScript script and change how I was kicking off my automations by pressing a button on a Stream Deck. On macOS, there’s usually a way around if you know the tricks. On iOS, that roadblock is often impassable, though that happens less often now than back in the day. When you’re automating something, sometimes you run into a roadblock. If you’re running an earlier version of MacOS and don’t have access to Shortcuts app, or you just don’t like it, then Automator is basically the same process but you make a Quick Action and choose the “Launch Application” option instead, then manually configure the keyboard shortcut in the Shortcuts preference panel of MacOS system settings.Shortcuts, AppleScript, Terminal: Working around automation roadblocks We’re focusing on accomplishing this with the Shortcuts app for Mac, but you can also make custom keyboard shortcuts with Automator on the Mac if you prefer to, and that works with older versions of MacOS as well. Another handy app to do this with is setting Activity Monitor to open by keyboard shortcut, or any other that you use frequently. You can use this same trick to open any application by keyboard shortcut, but obviously we’re focusing on the Terminal here. If you pick one that is common and conflicts with another key command, it will not work.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |