Question

I have written an AppleScript which when supplied with a Windows network link, will convert it to the correct smb:// equivalent for the server in our office, mount the network drive, and open the requested folder in Finder.

I have this built in an application which just takes a pasted network path. Ideally I need this to trigger on clicking a link in a Mail.app email message so that it can check if the link is in the correct format, and if so run the script and attempt to mount the drive and load the folder in Finder.

How would I go about doing this?

Was it helpful?

Solution

In order to do this I think you'd need to create a Cocoa application that was registered with OS X Launch Services as the default role handler for smb:// links.

I've written some stuff about how to do this on another question: How do you set your Cocoa application as the default web browser?

If there's a pure AppleScript solution or a way of only handling links within Mail.app I'm not aware of it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top