Connect to server on airport connect |
![]() |
Connect to server on airport connect |
|
bswinnerton
InsanelyMac Protégé
|
![]() |
Jul 3 2007, 05:01 PM Post #1
|
|
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
InsanelyMac Protégé
|
![]() |
Jul 3 2007, 06:59 PM Post #2
|
|
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 |
![]() |
|
Lo-Fi Version | Time is now: 22nd November 2009 - 07:41 AM |