I am trying to translate an Automator action to Keyboard Maestro. The outline is this:
A URL as a .webloc is selected using For Each Item in a Collection Execute Actions.
And, here is where I'm having a problem. I need to pass the URL without the path component to the Applescript that converts the URL to a pasteable link like this.
I've attached the Applescript as a file. applescript.zip (1.4 KB)
Upon completion of the script's conversion the result has to be returned to KM in order to paste it into a document as the formatted link.
I use this now through an Automator script that I simply call from KM, but I would like to translate the entire macro to just KM and not need to use Automator.
Peter tried to help me out, but I was just not able to get it to work. I cannot figure out how to get the URL.webloc file into the Applescript nor how to return a result to the System Clipboard in order COMMAND-V paste into a document.
Thank you, Chris, for taking the time to help me out. The files you asked for are attached. They include the Automator script, the KM macro calling it, three example links.
Whoa! That’s super-duper. You completely re-wrote the whole thing. You are very generous. I don’t know how to repay you, but if you ever need a professional investment analysis of a commercial real estate project, just let me know.
The irony of all of this is that Apple just released the third round of the El Capitan beta where the original problem that started all this was actually fixed.