image
image

Go Back   macosx.com > Design, Media, Programming & Scripting > Software Programming & Web Scripting

Reply
 
Thread Tools
  #1  
Old August 29th, 2002, 06:18 PM
Registered User
 
Join Date: Jun 2002
Posts: 349
Thanks: 0
Thanked 0 Times in 0 Posts
cabbage is on a distinguished road
AppleScript automount at startup

I found an applescript that will mount network volume on startup. It looks like this

tell application "Finder"
try
open location "afp://mjohnson:red4566@133.217.21.211/alljobs"
--the second volume here
--third volume here
--next volumes
end try
end tell


When I run the script even when the volume is already mounted I get an error
server returned error -5062

Lets say I mount 8 network volumes on startup and after an hour of work I umounted 5 of them and still have 3 mounted. I want to be able to run this script to remount the other 5, but as soon as it hits one of the 3 currently mounted volumes it gets an error. That's not a big deal I click OK and it goes away but the problem is it does not continue with the rest of the script.

Is there an error handler or something were it can just ignore the error and still continue with the rest of the script.

Or is there a line I can add to the top that unmounts all network drives?

Any help is appreciated!
__________________
~Cabbage
Reply With Quote
  #2  
Old September 3rd, 2002, 05:15 PM
Trip's Avatar
www.TannerSite.com
 
Join Date: Sep 2001
Location: Utah
Posts: 3,266
Thanks: 0
Thanked 0 Times in 0 Posts
Trip is on a distinguished road
I really have no clue, but I'll give it a shot:

I think there is a command (something like: "Disconnect all") you can use. OR you can make it so that it checks if the servers are mounted already and if they're not they will mount. Get it? That'd probably be easiest to do.
__________________
13" MacBook - 2GHz. 2 GB RAM. OS 10.4.7
12" iBook - 500 MHz. 640 MB RAM. (R.I.P.)
TannerSite.com
Reply With Quote
  #3  
Old September 3rd, 2002, 06:29 PM
Registered User
 
Join Date: Jun 2002
Posts: 349
Thanks: 0
Thanked 0 Times in 0 Posts
cabbage is on a distinguished road
thanks i'll give that a shot
__________________
~Cabbage
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SHUTDOWN without warning SCARY!! astro_sk Mac OS X System & Mac Software 10 May 16th, 2003 02:45 PM
Creating a Mac OS X startup disk CD ? Pascal Mac OS X System & Mac Software 15 March 25th, 2003 08:04 PM
AppleScript in the Finder in 10.1 (Spring-Loaded Folders???) simX Apple News, Rumors & Discussion 1 October 14th, 2001 10:27 PM
AppleScript Studio? Is this our new HyperCard? rharder Apple News, Rumors & Discussion 5 September 27th, 2001 12:44 PM
how to autorun at startup terminal command or applescript.. czeky Apple News, Rumors & Discussion 9 July 28th, 2001 01:51 AM


All times are GMT -5. The time now is 05:39 AM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.