Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

huyby

macrumors newbie
Original poster
Oct 15, 2009
2
0
Hi all,

Before I've upgraded from Leopard to Snow Leopard. I used an applescript to mount a network volume on startup:

Code:
delay 4
tell application "Finder"
	if not (exists POSIX file "/Volumes/Resources") then
		mount volume "afp://***.***.***.***/Resources" as user name "stijn"
	end if
end tell

This script worked fine under Leopard. But since Snow Leopard, the volume is mounted but it's greyed out in Finder. So I cannot access the volume through Finder > Devices > "Resources", and I can't unmount it either.

snow-leopard-network-device-greyed-out.png


I know you can also add a network drive in the login items, but that doesn't work at all because at the time the system wants to mount the drive, the network connection is not yet ready (that's why there is a delay in the applescript).

Any ideas to stop the volume from "greying" out?
 
Try adding a line like:

update volume "afp://***.***.***.***/Resources"

Have no direct evidence that this works, however, in a file copying script I use, the copied file appears gray (which SL uses to show the copy is in progress) and it stays that way. I added update filename to the script and the filename appears correctly. Could be a bug in SL or AS.

mt
 
Hi, thx for the replies!

I've tried the 'update' volume, but it seems AppleScript doesn't have something like 'update volume'.

So I tried the AutomountMaker and (most of the time) the script I've generated seems to mount the volume with success. In the first few launches of the script, the volume was 2 times greyed out, in all other (about 5) test the volume was 'active' in the Finder window.

I didn 't yet test the script when used as a login item. I'll leave a post when the script is tested for a few days.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.