Update your Skype location automatically
A few weeks ago I set up Skype so that my 'location' (the 'mood text' that you can set yourself) automatically updates when my network location changes. Here's how that looks:

To do this, I installed the briliant Sleepwatcher application on my Mac. This runs a script whenever the laptop goes to sleep or wakes up. Sleepwatcher allows you to customize your own script, by putting a '.wakeup' and '.sleep' script in your home directory. It will run this script. In my .wakeup script, I detect the network settings. At home I use Wifi, at the office I'm always connected to a fixed network.
Then the script updates the actual 'Location' that the Mac shows in the Apple menu. I'm sure I could change the default printer in this way but haven't figured out how yet. Let me know if you know how to do this.. Since I have an HP Deskjet both at home and at work, printing goes wrong frequently.
Next, I update the Skype mood text by executing osascript from the .wakeup script. Osascript allows you to run Applescript from shellscript, which is very convenient in this case!
Oh yes, I also take a picture with the iSight cam. I've gathered a few hundred pictures of myself in this way. You could use this as a security feature by uploading these pictures to some server automatically..
Here's my full .wakeup script. It takes several things I found on the web together in one script, sorry for not being able to recall the origin of these ideas.. My .sleep script looks similar but much simpler, it only logs to the sleep.log file
#!/bin/sh
date=`date`;
# Generate filename based on date stamp
filedate=$(date +%Y%m%d%H%M%S).jpg;
# Take iSight Photo and store in /tmp with datestamp filename
/bin/isightcapture -w 640 -h 480 -t jpg /Users/myname/Documents/captures/$filedate >& /dev/null
sleep 10 # better for stability
#get the ssid of the network you are on
#shown on two lines; should be one with a space
ssid=`ioreg -l -n AirPortDriver | grep APCurrentSSID | sed 's/^.*= "\(.*\)".*$/\1/; s/ /_/g'`
enetip=`/sbin/ifconfig en0 | grep netmask | awk '{print $6}'`
#fill in your own values for ssid and location below
if [ x$ssid = "xnb" ];
then
location="Thuis"
elif [ x$enetip = "x10.1.1.255" ]
then
location="Diemen"
else
location="Automatic"
fi
#echo $location
#update the location
newloc=`/usr/sbin/scselect ${location} | sed 's/^.*(\(.*\)).*$/\1/'`
echo "wakeup: ${newloc} at ${date}" >> sleep.log
osascript -e "tell application \"Skype\"" -e "send command \"SET PROFILE MOOD_TEXT @ ${location}\" script name \"My Script\"" -e 'end tell'
#exit with error if the location didn't match what you expected
if [ ${location} != ${newloc} ]
then
exit 1
fi
exit 0
