AppleScript Help needed...

Joined
Oct 6, 2006
Messages
5
Reaction score
0
Apologies if this is an area that's been covered before.

I work in a graphic design studio with an Xserve as our main server and a number of G5s and newer Intel iMacs. I want to create a quick applescript to connect to the server automatically when I start my machine in the morning, and then customise it so that everyone else in the studio can have it on their machine as well.

I've had a quick poke around with the Script Editor but quite quickly got stuck.

Thanks!

sketch
 
Joined
Mar 28, 2006
Messages
198
Reaction score
5
I've got the same kind of thing running at my office. We have 4 different volumes that all need to be mounted on startup... It's a fairly simple Applescript... I have all my users have it as a start up item and also keep it in their dock in case of disconnects.

tell application "Finder"
mount volume "afp://username:password@IPaddress/volumename"
end tell

just open script editor, copy and paste this into it, and fill in your specific info
Then compile it and save as an application.
 

Ric

Joined
May 14, 2004
Messages
4,257
Reaction score
5
Hi all,

you can also make an alias of the Server and then add it into the login items on each Mac.

Mount each volume...Then open System Prefs-->Accounts and drag the disk icon to the Login items pane...

Auto_login.jpg


regards

Ric
 
Joined
Feb 12, 2005
Messages
267
Reaction score
8
I don't know if connecting to an in-house server is different from connecting to your standard ISP host, but when I start my computer it auto-connects due to start up items such as mail.

You can configure this from the PPP options in systempref/network
 

Attachments

  • Picture 1.jpg
    Picture 1.jpg
    39.4 KB · Views: 433
Joined
Mar 28, 2006
Messages
198
Reaction score
5
Sure, you could make it a startup/login item, but what's the fun in that!?

I'd originally set up all our machines at the office with the servers as startup items, but we had several weirdnesses occur that convinced me to set them up differently. (We connect to our local servers via TCP/IP.)

1-Start up items would "forget" what the drives were (as in "kind" would be "unknown") and would therefore not connect on start up.

2-Connections to the server would be dropped and under "Connect to Server" in the "Go" menu, the servers we'd need to connect to were grayed out, which is how they would look when you're already connected.

These problems could very well be a symptom of a different problem on our network, but for us, the Applescript solution works quite well, and in fact is the only thing that works consistently on all the computers.
 

Ric

Joined
May 14, 2004
Messages
4,257
Reaction score
5
I know what you mean ;-)

The login items is a bit hit and miss sometimes, I'm sure the AppleScript is the best bet.

regards

Ric
 
Joined
Oct 6, 2006
Messages
5
Reaction score
0
seems to work perfectly - have to hit enter a couple of times but at least I won't forget to connect to the server.
 
Joined
Oct 6, 2006
Messages
5
Reaction score
0
hmmm - I put it in the startup items folder but it doesn't seem to be running when I restart the machine... all I've done is dragged 'n' dropped it into the folder - is there something else I need to do?
 

Ric

Joined
May 14, 2004
Messages
4,257
Reaction score
5
Hi there,

Instead of putting it into the startup items folder...go to system prefs-->accounts and add it into the login items.

regards

Ric
 
Joined
Oct 6, 2006
Messages
5
Reaction score
0
that's what I was missing ric.

many thanks all, works great - already spread it around the studio!

cheers
sketch
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top