Shortcuts Picker for macOS Monterey+

With the release of the macOS Monterey Release Candidate today and the public release coming next week, I'm posting this macro to make it easier for those of us accustomed to launchers like Alfred and the Trigger Macro by Name action to start using Shortcuts on our Macs. This macro uses a couple of simple AppleScripts and the Prompt With List action to present the user with a list of every shortcut on their system and run the chosen shortcut without needing to open the Shortcuts app or assign a shortcut to the menu bar or a quick action.

Shortcuts Picker.kmmacros (3.2 KB)

7 Likes

Do you have an example of how it looks?

I don't see the update yet, but great to hear!

Edit:

public release coming next week

ah

It's just a standard Prompt with List action, only populated with whatever shortcuts you have (most of mine are still just synced over from iOS and aren't useful on macOS, but for illustrative purposes):

Shortcuts

Shortcuts Picker

3 Likes

Thanks @gglick !

Thank you for sharing this.

Have you tried implementing an option to pass some text into the shortcut being executed as its input?

I looked up for that in the Shortcuts AppleScript dictionary and there is an entry run [shortcut] [with input any], but I can't get it work.

During the Monterey Beta I tried getting that to work, but was having difficulty due to early bugs, so I resorted to passing data through a file instead, and the shortcut just opened a specific file. This solution worked for me, but if I get the other way to work, I'll post it here. In the meantime, just use a file to pass data. It's a lot easier to pass larger volumes of data in a file than in a string anyway.

You're welcome. It's a good idea, but not one I have time to figure out how best to implement now. But in the meantime, I was able to put together this quick proof of concept macro showing how to pass a KM variable to a shortcut via AppleScript:

Example Macro.kmmacros (2.6 KB)

Shortcut

Result

2 Likes

Great work! I have incorporated these ideas into a paired KM macro and Shortcuts suite which allows user to choose a shortcut from a prompt list and then opens the selected shortcut for editing, as opposed to running the shortcut. Defaults to previously selected shortcut. I find myself editing shortcuts on the Mac more than running them.

First, the KM macro (uploaded in disabled state):

EDIT SHORTCUT.kmmacros (3.3 KB)

image

Second, the shortcut, "Edit A Shortcut", that receives input from the KM macro and opens the selected shortcut for editing can be downloaded here: Shortcuts

4 Likes