views:

71

answers:

1

I've written an Applescript which when supplied with a Windows network link, will convert it to the correct smb:// equivelent 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: attempt to mount the drive and load the folder in Finder.

How would I go about doing this?

+1  A: 

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.

georgebrock