Subscribe to our RSS news feed
AAPL 199.94 (-1.25)

 
Reply to this topic Start new topic
Connect to server on airport connect
*
  • Group: Members
  • Posts: 19
  • Joined: 22-June 07
  • From: Connecticut, USA
  • Member No.: 116,584
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.
PM Profile Card
Go to the top of the page
+ Quote Post
*
  • Group: Members
  • Posts: 19
  • Joined: 22-June 07
  • From: Connecticut, USA
  • Member No.: 116,584
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
PM Profile Card
Go to the top of the page
+ Quote Post
Reply to this topic Start new topic

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

RSS Lo-Fi Version Time is now: 22nd November 2009 - 07:41 AM