I am using a fileserver at home, and various SMB shares at my university, so I needed a script that automatically mounts the appropriate shares, or unmounts those that are already mounted. Apparently, I am not able to detect which network location is selected (or which IP I have) via AppleScript, so I need two different versions of the script at the moment.
I define the network shares, the servers, and the protocols, and with a double-click, I get all shares mounted. If any share was already mounted, the script assumes that it has to disconnect every defined share. Works with FTP, NFS and SMB shares; perhaps even with more.
[robg adds: I haven't tested this one...]
Mac OS X Hints
http://hints.macworld.com/article.php?story=20050315094624607