• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Mounting a laptop volume
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mounting a laptop volume


  • Subject: Re: Mounting a laptop volume
  • From: Axel Luttgens <email@hidden>
  • Date: Thu, 12 May 2011 17:00:00 +0200

Le 12 mai 2011 à 16:03, Jim Brandt a écrit :

> 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"
>
> [...]

Hello Jim,

IIRC, Standard Additions' "mount volume" command was extremely problematic under 10.4.x, and I had to resort to the "open location" command instead:

	open location "afp://Living-Hope-Churchs-MacBook.local./jim"

But there's a slight problem: "open location" executes asynchronously.
You'll thus have to poll until the volume mounts; for example:

	tell application "Finder"
		set Secs to 0
		repeat until exists disk "jim"
			delay 1
			set Secs to Secs + 1
			if Secs ≥ 120 then
				display dialog "Failed."
				error number -128
			end if
		end repeat
	end tell

Of course, this relies upon the fact that there is not volume named "jim" beforehand...

HTH,
Axel

 _______________________________________________
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

References: 
 >Mounting a laptop volume (From: Jim Brandt <email@hidden>)

  • Prev by Date: Mounting a laptop volume
  • Next by Date: Re: Mounting a laptop volume
  • Previous by thread: Mounting a laptop volume
  • Next by thread: Re: Mounting a laptop volume
  • Index(es):
    • Date
    • Thread