I need to right click a link on a website...
and open the Services menu...
to run an Automator Action on the text/url of that link.

I need to "get" the url from the link into the script so I can run some shell script actions on it and then output the result to the clipboard.

I am having a hard time finding a way to copy that url into the Action using automator. I need a way to replicate the "Copy Link" function that already exists in Safari drop down menu when right clicking inside of the Quick Action.

I would prefer to not "allow javascript from Apple Events" as it's a security risk.

1 Answer 1


There is a right click command on AppleScript.

Might also be worth looking into a combination of CliClick and cURL using Brew / Bash for this purpose.

  • what is the right-click command in AppleScript? How would I incorporate that into my Automator Action to grab the text/url? CliClick and cURL don't copy highlighted text.
    – John
    Commented Mar 30, 2020 at 7:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .