0

I'm trying to create an Automator service that will parse Windows UNC links and open them properly in Finder, by converting the links to SMB links. The service typically gets its input from a mail client (Mail / Outlook) or a document (Word / Pages / PDF).

The problem is that sometimes the link text is different than the UNC path itself (i.e. a "Click Here" link). I am only able to get the selected text in the service, but not the link behind it. I thought of parsing the currently selected message/document in the active application and searching for a link with a matching text, but sometimes there are several links that say "Click Here"...

Any ideas how to get the link behind the selected text?

Thanks in advance, Guy

Guy
  • 1
  • 2

1 Answers1

0

Here is exactly what your looking for. When creating an automator action, there's an "Extract URL from text" action. After extracting the url from text, use the applescript link provided to convert the UNC to SMB and open in Finder.

Jason
  • 650
  • 2
  • 10
  • 33