Re: Mounting a laptop volume
Re: Mounting a laptop volume
- Subject: Re: Mounting a laptop volume
- From: CYB <email@hidden>
- Date: Thu, 12 May 2011 11:24:49 -0500
- Thread-topic: Mounting a laptop volume
Title: Re: Mounting a laptop volume
I have a question about how to mount a laptop, connected wirelessly to my local network, on my desktop computer via Applescript.
I'm currently doing this manually.
1) Select "Connect to server" menu item of "go" menu
2) Click "Browse", pick laptop, click "connect"
3) Click "connect" on dialog (User Name and password are in Keychain)
4) select volume to mount, click "ok"
Looking at AS User's Guide, I should be able to use the "mount volume" command.
I've tried several versions and none work.
BTW, with the volume mounted manually, a "Get Info" command of the volume shows the server name as: "afp://Living-Hope-Churchs-MacBook.local./jim"
I have tried:
1) tell application "System Events" to mount volume "afp://Living-Hope-Churchs-MacBook.local./jim"
error is "System Events got an error: Disk jim wasn't found."
2) tell application "System Events" to mount volume "jim" on server "smp://Living-Hope-Churchs-MacBook.local."
error is "System Events got an error: Disk jim wasn't found."
3) tell application "System Events" to mount volume "/Macintosh HD/Users/jim" on server "smp://Living-Hope-Churchs-MacBook.local."
error is "System Events got an error: Disk /Macintosh HD/Users/jim wasn't found."
4) tell application "System Events" to mount volume "jim" on server "smp://Living-Hope-Churchs-MacBook"
error is "System Events got an error: Disk jim wasn't found."
5) tell application "System Events" to mount volume "/Macintosh HD/Users/jim" on server "smp://Living-Hope-Churchs-MacBook"
error is "System Events got an error: Disk /Macintosh HD/Users/jim wasn't found."
So, my question is: what should the combination of disk name and server name be?
If it matters:
The laptop is Intel running 10.6.6
The desktop is a PowerPC G4 running 10.4.11
I want the script to run on the desktop machine. Once I get past this hurdle I need to sync several folders between the two machines.
TIA,
Jim
JIM:
I have a snippet that I use to mount a volume is very simple, but it depends on a fix IP address
Property pIPaddress : 192.123.456.101
on Montar_Server(Usuario, Clave)
set ServerSetting to "afp://" & Usuario & ":" & Clave & "@" & pIPaddress & pDirectorio
mount volume ServerSetting
end Montar_Server
If you don;t have fix IP you need to collect this info.
As you can see you don’t need system events.
Hope this help
Carlos Ysunza B.
Director
Ysunza/Santiago
Visual Communication • Automation
Tel. (52)55 5256-0336
email@hidden
http://www.ysunzasantiago.com
http://www.thesecretmexico.com
http://www.softrobot.com.mx
_______________________________________________
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