Re: AFP mount
Re: AFP mount
- Subject: Re: AFP mount
- From: Neil Laubenthal <email@hidden>
- Date: Mon, 16 Apr 2007 18:42:10 -0400
I'm coming into this thread late . . . but it looks like the share
point is at technology.
In that case . . . what you need is a
tell application "Finder"
mount volume "afpt://username:password@servername_or_ip/technology"
pause 3
--this step only necessary if you want to open the directory, the
step above will mount Technology on the desktop
activate
select window of desktop
select window of desktop
make new Finder window to disk "Technology"
select Finder window 1
select Finder window 1
set target of Finder window 1 to folder "Instructions" of disk
"Technology"
select Finder window 1
select Finder window 1
set target of Finder window 1 to folder "Mac" of folder
"instructions" of disk "technology"
set target of Finder window 1 to folder "Instructions" of disk ""
end tell
I checked and this mounts a share named Technology, then opens
Technology, then folder Mac, then folder instructions . . . but you
can always turn on recording and walk through the opening part.
There's probably also a way to tell Finder to select folder mac of
folder instructions of disk technology and then open the
selection . . . but I couldn't figure out the right syntax for this
quickly.
Under Tiger . . . if you end up wanting to mount more than one share
point from the same server . . . you have to replace the mount volume
with open location . . . unfortunately that opens the disk as
well . . . but I've got a script I found somewhere that captures the
drive names and closes the disks after they are opened . . . if
anybody wants it I'll post it.
On Apr 16, 2007, at 07:06, Luca Pozzato wrote:
On 10/apr/07, at 20:17, Hung Phan wrote:
I write an applescript to mount an afp sharepoint at location /
technology/instructions/mac
Here is the script:
tell application "Finder"
activate
try
mount volume "afp://" & username & ":@myserver_name/technology/
instructions/"
end try
try
open folder("technology:instructions:mac")
on error
display dialog "Sorry, Cannot access your folder. " buttons "Ok"
default button "Ok"
end try
end tell
Everytime we run, we receive "Sorry, Cannot access your folder"
message but get the shared point to mount at technology. Is the
open folder command correct?
Thank you for your help,
hi Hung,
since you got the message the error is in "open folder…", just add
a colon at the end or check if the path really exists
try
open folder ("technology:instructions:mac:")--colon after mac
on error mymsg
display dialog mymsg & return & return & "Sorry, Cannot access
your folder. " buttons "Ok" default button "Ok"
end try
Luca
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
40laubenthal.net
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden