How can I run my shortcuts?

The ability to easily run a shortcut is of obvious importance, and I’ve summarized below several approaches. They all work on macOS Tahoe, but several will not work on earlier versions of macOS.

A simple approach is to run a shortcut from within the Shortcut Editor, but this is primarily of use when writing and testing a shortcut. For occasional use, you can run a shortcut from the Shortcuts app’s main window. Just click on the right-arrow icon before the shortcut’s name.

You can also run a shortcut by way of a keyboard shortcut (Control-M in the following example). This approach doesn’t work as well as one would hope, although it’s still quite useful.

The context menu for every shortcut has an Add to Dock entry and running a shortcut by way of a Dock icon works well. This adds an APP file to an Applications folder in your home folder, and this file can be used for other purposes. For example, you can Command-drag the APP file to the Finder toolbar to create a toolbar icon.

Spotlight is a great way to run a shortcut, and Quick Keys make this even more useful. You do have to enable the Show in Spotlight option for the shortcut.

The Control Center can be used to add a single shortcut icon or a Menu Bar Collection icon to the menu bar or Control Center. The following screenshot shows the Control Center configuration dialog.

The screenshot below shows a Menu Bar Collection dialog. It also shows how items are added to the dialog in the main window of the Shortcuts app. In earlier versions of macOS, the Menu Bar Collection was a drop-down list.

Shortcuts can also be run by way of a Widget on the desktop. The specific shortcuts in the widget are those contained in a folder in the main window of the Shortcuts app.

I am only aware of one app whose primary purpose is to run shortcuts, and it’s called Short Run. This utility allows you to designate both global and application-specific shortcuts, and shortcuts can be run by way of Quick Keys (but not keyboard shortcuts). In the following example, two Finder specific shortcuts are displayed as are four global shortcuts organized in a Backup folder. The Backup but not the Finder shortcuts have been assigned Quick Keys. The Short Run app is available in the App Store and costs $6.00.

Shortery

1 Like

In addition to the approaches detailed in my earlier post, a shortcut can be run by way of a Quick Action. In the following example, the shortcut inputs text selected in a text editor, edits the text, and outputs the edited text to the text editor, replacing the selected text. This doesn’t work with every app, but it does with most.

A shortcut can also use a Quick Action to work on a file or folder selected in a Finder window. This is useful, although there’s a Get Selected Files in Finder action that can do pretty much the same thing.

Final mention should be made of Automations as a means of running shortcuts. In macOS Tahoe, there are numerous automations that are easily implemented, and additional automations are being added in macOS Golden Gate. Most of the automations in Tahoe work well, but a few (like Email) don’t seem to work at all. Hopefully they will be fixed in Golden Gate.

If native Shortcuts automations won’t do the job, the Shortery app seems well regarded. My needs in this regard are simple, so I haven’t tested this app.

Forgot about this one:
Short Run

I use AppleScript to run various shortcuts, like below. Dunno if that’s a helpful addition to the toolbox but it works

-- bits of initialisation code 
	set shortcutName to "Kitchen power monitor"
	set alertMessage to "🚨 Kitchen power is off!" as text
	set messageRecipients to {"[my number]", "+[my husband’s number]"}
	tell application "Shortcuts Events"
		set powerStatus to (run shortcut shortcutName)
	end tell

-- more code here

	if powerStatus contains "POWER IS OFF" then
		tell application "Messages"
			set messageService to 1st account whose service type is iMessage
			repeat with messageRecipient in messageRecipients
				set targetRecipient to participant messageRecipient of messageService
				send alertMessage to targetRecipient
			end repeat
		end tell
    end if
1 Like

Thanks evilpants. I completely missed running a shortcut by way of an AppleScript, and it’s certainly a worthwhile addition.

A related option is to run a shortcut by way of the shell. This is the approach I use to run shortcuts by way of FastScripts (an AppleScript works just as well).

#!/bin/zsh

shortcuts run "Morning Greeting"

Thanks pjh. I discussed the Short Run app at the end of post 1.

Oops, sorry, overlooked that.