Shortcuts – how do users install and how to use URL scheme ?

I would like to distribute a Shortcut with my AppleScript applet (currently the work is done by an Automator Service). I have two questions:

Is it possible to automate the installation for users ? It seems that the only way a shortcut can be installed is via the Shortcuts app. So, when they ask for the Shortcut to be installed, the app must be opened and then users have to respond to the install shortcut dialog and, at least, click on "Add Shortcut".

  • Can that process be automated ?

A shortcut can be run from a URL, which is very useful. The URL looks like this:

 shortcuts://run-shortcut?name=[name of shortcut]

However, running a shortcut from a URL always opens the Shortcuts app before running the shortcut. This breaks my code which is expecting a web browser to be active.

  • Is there a way of using at the shortcuts URL scheme run the shortcut in place i.e. without opening the shortcuts app ? Or, can the URL scheme be used to call the Shortcuts Event app ?

Thanks.

Can that process be automated ?

General speaking, you can make standard installer to install AppleScript applets. Though I don't make such a installer with latest version of Xcode.

Is there a way of using at the shortcuts URL scheme run the shortcut in place i.e. without opening the shortcuts app ? Or, can the URL scheme be used to call the Shortcuts Event app ?

You can execute Shotcuts by using Shortcuts Events.app without launching Shortcuts.app. But....URL event is a kind of Apple's security broker. Apple want to keep them inactive....Some minor macOS update may effect your app due to the security reason or bug.

Piyomaru, thanks

you can make standard installer to install AppleScript applets

I don't need an installer for my applet. I need a way to automate installing Shortcuts so users do not have to do it themselves in the Shortcuts app.

Some minor macOS update may effect your app due to the security reason or bug

I don't understand your comment. I would like to use the Shortcuts URL scheme to call Shortcuts Events.app. At present, the URL scheme is useless to me because it always opens the Shortcuts app before running the shortcut. Because the Shortcut app is frontmost and active, it breaks my shortcut which gets URLs from web browsers etc.

Shortcuts – how do users install and how to use URL scheme ?
 
 
Q