Open sindresorhus opened 3 years ago
My reply:
I’m implementing the Scripting Bridge way in an app of mine and it takes 5 seconds (!) on a fully specced MacBook Pro (16-inch, 2021) to fetch 30 shortcuts. That is not a good user-experience…
There’s also no way to get notified when shortcuts change, so I have to refetch them every time the window regains focus.
Description
It’s awesome that macOS now has Shortcuts, but the suggested way for apps to list and run shortcuts is a bit archaic.
From the WWDC21 talk on Shortcuts:
A lot of apps would benefit from being able to run Shortcuts. For example, a calendar app could let the user pick a shortcut to run when an event starts. There are just so many cool opportunities. But the Scripting Framework is archaic, buggy, and slow, which will deter a lot of apps from bothering.
I would suggest adding some high-level APIs to list and run Shortcuts.
For example: