Make your portable mac behave differently in different locations

image © Apple
Different places, different needs
Startup Items lets you open the same applications every time you log in, but that is not necessarily what you want. I have different uses for my MacBook Pro depending on where I am, and I want different programs started and different servers mounted at work than I do at home.
Removable hardware and networks disks are not always available for a portable computer. If you try to mount disks when they are not available, you are causing unnecessary delays, and you get annoying error messages. And if you do not have a solution for mounting the disks automatically, you have to do it manually every work day.
The solution
I have made a small applescript that solves most of these problems. Just download the script here and double click it to open in script editor. Then follow the instructions in the comments inside the script.
The script works by assuming that you get assigned an ip address within different ranges in different physical places. You tell the script where each range belong, and what you want done when you are at that place.
It’s easy!
If you are new to programming, I can promise you that this sounds a lot harder than it is. Applescript is made for non-programmers like you, and you will easily understand what is going on. At least take a look at the script before you give up!
Update: Alternative solution
I started working on making a more user friendly application to manage locations, but I put that on hold when I found that WiLMa - The WIreless Location MAnager may do the trick. I will try it out, but my guess right now is that WiLMa may be easier to use, and that the above script gives you more control.
Update II: Added functionality
You may now switch behaviour using the Airport network name in addition to the IP address.

June 22nd, 2006 at 1:04 am
An article like this deserves to be del.icio.us-ed. I clicked the “Add to del.icio.us” link on the bottom of the post, and to my surprise i found that del had already filled in the description for me:
Lasse klein:Der klassische Hauselch der Allee in klein. Der perfekte Begleiter für einen spackonstischen Tag:Comfort T: Topseller, 100% Baumwolle
June 22nd, 2006 at 1:26 pm
Close, but no sigar