ucantblamem

Archive for January, 2008

Ramblings of a restless mind: December 2007 edition

4th Jan 2008

I’m a bit behind with this edition of ramblings, mostly because I was enjoying my time off, but here it is:

Just a short one for December - I hope to make up for it this month. Enjoy!

Auto-mounting network drives with AppleScript for specific locations

2nd Jan 2008

One of the things that I love about OS X is locations, which allow you to define different network settings for the different places/environments you’re in. So, for instance I use a DHCP (obtained IP) style network at home and I have a static IP at work.

Locations on OS X

My only issue is that it doesn’t allow me to do other things when I’m in a specific location. For instance, at work I need to mount a number of network drives to be productive and while Leopard makes this a relatively simple process (Shared Computers list), considering that I need to mount 5 or more drives it could be simpler.

Please note that the following process is only necessary if you want to auto-mount drives for a specific location. If all you need to do is auto-mount a network drive, please see this article.

Thankfully, being a Unix based system, OS X provides us with a number of scripting languages to automate tasks including Ruby, Python, PHP and even Cupertino’s own AppleScript. One of the major advantages to AppleScript is that it can communicate very effectively with the UI and the OS X systems in general (Whereas the other mentioned languages take a little more effort).
(more…)