Change "Location" with a script?
I am working in two different (network) environments and need to change both network settings (proxy, ...) and also computer settings (CUPS server) and some environment variables depending on my physical location. For the latter two I have a little bash script that does that conveniently.
But changing the network always requires a few clicks extra... I was wondering if it was possible to change the network environment ("Location" in the Apple menu) by a script (I tried with AppleScript and Automator but didn't find anything) or to run a script automatically whenever I change the Location. This way I would only have to run either the script or change the Location to adjust all settings.
Can anyone help me here?
Thanks a lot,
Leonard
MacBook Pro, Mac OS X (10.6.2)