Out Of The Box Automation on Mac OS

Sparked by a security discussion at work…

… If I had to automate a Mac based solely on what Apple provide, how would I

  • Kick off automation with a hot key combo?
  • Kick off automation with a short phrase?
  • Act on selected text?

I think I’d be down to AppleScript or JXA. It’s the triggering that I wonder about.

Frankly, I don’t think this is going to happen. What is more likely is to be restricted to what’s in the Mac App Store - which rules out eg Keyboard Maestro, Hazel, BetterTouchTool. (And Script Debugger, Audio Hijack, and possibly Python.)

2 Likes

You should be able to use automator to create a service that runs an applescript, and then in system preferences link a keyboard shortcut to the service to trigger it.
Also this would give you the right click option in applications to trigger the script.

(Of course once Monterey is released: create a shortcut with a keyboard shortcut attached :slight_smile: )

1 Like

Thanks!

Could I use a keyboard shortcut to kick off an AppleScript script or JXA directly?

I don’t think so, at least I’m not aware of any options to do that.

1 Like

Right. So Monterey would be the better platform - in case I had to do this.

not sure about “better”, but easier yes

You can use a keyboard shortcut to kick off an AppleScript or JXA with Automator.

Open Automator and choose Quick Action. Make the first line of the quick action read Workflow receives no input in any application. Then in the Action pane choose either the Run AppleScript action or JavaScript action. Copy in this action your code. Save it with a name. Open System Preferences and go to the keyboard settings, then Shortcuts and select there Services and give your action a keyboard shortcut.

2 Likes

Monterey Shortcuts app allow for using a Keyboard Shortcut as a trigger for a Quick Action. It worked almost every time in my testings.

1 Like

Have you tried Shortcuts in the Monterey beta yet?? :open_mouth: :stuck_out_tongue:

1 Like

Oh yes, and it’s “a work in progress” … (putting it mildly :wink: )

2 Likes

If I had to do this (which I can’t imagine ever happening) I would imagine using Automator to make a lot of apps or services because you can assign keyboard shortcuts to them or use Spotlight.

1 Like

My workplace has shared workstations, so anything I build for work needs to be based on free tools. I’m pumped for Shortcuts to ship so I can start automating, since I have no AppleScript chops and my shell scripting is rudimentary.

1 Like

Nobody has AppleScript chops. :slight_smile:

I, too, am looking forward to Shortcuts.

1 Like

indeed!
only google skills :slight_smile:

1 Like