Automating with Shortcuts and macOS Folder Actions »

Jason Snell shared a classic automation post covering how to use long-living Mac feature combined with the latest Shortcuts features.
Automating with Shortcuts and macOS Folder Actions »

From Jason Snell at Six Colors:

Folder Actions is pretty clever—you can run scripts when items are added or removed from a folder, when the folder is opened or closed, or when the window of that folder is moved in Finder.

Unfortunately, this is a feature that is wired directly into AppleScript. So in order to use a version of my existing shortcut with Folder Actions, I needed to write a three-line AppleScript script:

on adding folder items to this_folder after receiving added_items
    tell application "Shortcuts Events" to run the shortcut named "Apple Result Transcriptor" with input added_items
end adding folder items to

Pretty dumb — for those keeping score we’ve now gone from Audio Hijack to AppleScript to Shortcuts in order to get what we want. (I could’ve rewritten my Shortcut in AppleScript, but… I don’t want to do that!) And yet also pretty brilliant, because I’m using a 21-year-old OS feature to run a Shortcut, an automation system that didn’t appear on the Mac until 2021.

Neat feature – and I agree with Jason’s conclusions at the end about Automations on the Mac.

Read the full story on Six Colors.

Posts You Might Like

Easily Design Custom Stream Deck Icons with Button Creator for macOS
Easily Design Custom Stream Deck Icons with Button Creator for macOS
When building out your Stream Deck, you're going to need icons – this Mac app Button Creator lets you customize your own in a simple interface.
Josh Elman, Product Marketing for Siri and Apple Intelligence, Joins a16z
Josh Elman, Product Marketing for Siri and Apple Intelligence, Joins a16z
John Elman, formerly Product Marketing at Apple, has left his most recent work on Siri and Apple Intelligence to rejoin the startup investing world as a partner at a16z.
Use This Automation To Protect Your iPhone If Stolen While Unlocked
Use This Automation To Protect Your iPhone If Stolen While Unlocked
Diego Jimenez has put together a clever shortcut for securing your iPhone using the Lock Screen action that works as a Personal Automation when Airplane Mode is activated.
Mac Tip: Try Highlighting Text With A Single, Double, Or Triple Click »
Mac Tip: Try Highlighting Text With A Single, Double, Or Triple Click »
This Mac tip is easy to miss, but super helpful when you need it – here's how to single, double, and triple clicking helps make highlighting the correct text easier.