Are you sure the other characters are all good for an URL? Are you using EncodeURLComponent for that?
This should be the correct syntax. “?” usually denotes the starting of parameters (should appear only once, after the target, and before any parameter). Then “&” denotes an additional parameter will follow. Each parameter is in the form “name=value”.
Syntax looks correct however it looks like I misread the &silent function. The actual text says “You can [add] &silent=true in url for importing [a] shortcut in library without opening Shortcut app.”
Shortcuts wasn’t really designed for super heavy coding/automating. To me it feels like Apple’s just thrown this onto macOS as an after thought after spending many years trying to kill AppleScript (Third attempt to my recollection if we count ScriptingBridge) so there’s always going to be a little bit of compromise with whatever solution chosen.
This seems very cool, but it is not what I need for this program which is not dealing with specific Shortcuts that I (the developer) can anticipate. But it sounds interesting in other contexts. Of course,
extract the EXEC
is not in my comfort zone.
As for
time to break out Hopper and tear the exec apart
now you are so far out in the weeds that I cannot see the top of your head.
To me it feels like Apple’s just thrown this onto macOS as an after thought after spending many years trying to kill AppleScript (Third attempt to my recollection if we count ScriptingBridge) so there’s always going to be a little bit of compromise with whatever solution chosen.
I am not quite as cynical about this as you are. Shortcuts has migrated from iOS where AppleScript does not exist at all. I believe (hope) that Apple has remained committed to Automation and Shortcuts does seem to be their next go at it (AppleScript and then Automator and now Shortcuts). AppleScript (famously described as readable but not writable) will take a long time to replace and Shortcuts does not seem to be really designed to do this. It is more like a replacement for Automator. It is tragic that AppleScript is so difficult to write seemingly handicapped by a decision to make it “English-like” which perversely made it hard to deal with.
I was doing the equivalent "manually’. I am very glad to learn about this command which is clear and more general. Now I am using it.
This should be the correct syntax. “?” usually denotes the starting of parameters (should appear only once, after the target, and before any parameter). Then “&” denotes an additional parameter will follow. Each parameter is in the form “name=value”.
This snippet is helpful for me (a novice) to get a deeper understanding and move one step beyond just copying and pasting.