Help - Search - Members - Calendar
Full Version: Connect to server on airport connect
InsanelyMac Forum > Discuss and Learn > Internet(s), Servers, and Networks
bswinnerton
Hi everyone,

I'm looking to do something, and i really have no idea how i would do it. I think that it might have something to do with automator, but i'm not sure.

What i'm trying to do is connect to a server when i connect to a certain network. For example when i go to work and connect to their wireless router, i want it to automatically put my servers on the desktop, however i don't want it to do this when i get home.

Is there any way of doing this, i've been playing around in automator and i think it might be possible, but i really wouldn't even know where to start.
bswinnerton
Okay i found this on another forum:

CODE
set current_location to do shell script "scselect 2>&1 | grep '^ ' 2>&1 | grep '*' | cut -f 2 -d '(' | cut -f 1 -d ')'"

if current_location is equal to "Work" then
    mount volume "smb://servername/username"
    mount volume "smb://servername/public"
    mount volume "smb://servername/shared"
else if current_location is equal to "Home" then
    mount volume "smb://servername/mystuff"
end if


But what i'm looking to do is set the volume at work, but at home i don't have any so what should i put for the "else if", is "do nothing" a vaild command?

Also, what is the easiest way to change locations automatically?

Thanks everyone. Sorry if these are stupid questions, i'm new to os x
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.