ConnectToSharedDrive.app
Here in the office, we use a network drive (called Betsy) to store all of our files. Because I’m too lazy to manually connect to Betsy drive each time I turn on my computer, I use a little AppleScript to do it for me (ip address changed to protect the innocent):
tell application "Finder" if not (exists disk "betsy") then mount volume "afp://luke@127.0.0.1/betsy" end if end tell
Here’s how to do it…
Paste the above AppleScript code into the Script Editor (/Applications/AppleScript/Script Editor.app), then chose File > Save As… and save it as ConnectToBetsy.app. Make sure to choose Application instead of Script as the file format.

Then, add ConnectToBetsy.app to your login items. Open System Preferences > Accounts, select your account and choose the Login Items tab. Click the + icon at the bottom to add a new login item, and browse to ConnectToBetsy.app.

That’s it, you’re done! The next time you start up your computer, it will automatically connect to the network drive (It’ll ask you for your password the first time. Just make sure to check the Remember my password checkbox so it won’t ask you every time). If the network drive ever gets disconnected, you can just double click ConnectToBetsy.app and presto, you’re reconnected.
Enjoy!
February 9th, 2009 at 4:33 pm
So… um… nifty script. But you can also just drag the shared drive directly into the list of Login Items? Presto magic.
February 9th, 2009 at 5:20 pm
Haha, that sure shows me up on the Simple-O-Meter…