• 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: Getting A Folder On An Image Disk
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting A Folder On An Image Disk


  • Subject: Re: Getting A Folder On An Image Disk
  • From: KOENIG Yvan <email@hidden>
  • Date: Wed, 18 Jan 2012 17:14:18 +0100

Le 18 janv. 2012 à 16:37, Luther Fuller a écrit :

> I have been experimenting with this script ...
>
> property aliasAlias : alias "path:to:an:alias file"
>
> tell application "Finder"
> 	try
> 		set targetFolder to (original item of aliasAlias) as alias
> 		-- errors because original item is on an unmounted image disk
> 	on error
> 		try
> 			open aliasAlias -- mounts the image disk and opens window of target folder <<<<<
> 			delay 1 -- wait for disk to mount
> 			set targetFolder to (original item of aliasAlias) as alias -- no error
> 			close window of targetFolder -- closes the unwanted window
> 		on error
> 			set targetFolder to "error"
> 		end try
> 	end try
> 	display dialog targetFolder as text
> end tell
>
> The problem is with the line marked <<<<
>
> I would like to mount the image disk, but I can't find any Finder command
> other than open which will do this. I need a Finder command which will cause
> the image disk to mount, but without opening the target folder.
>
> Did I miss something? Or am I stuck with flashing a folder window at the user?


Maybe :

set chemin to "Macintosh HD:Important:Tout Gerbino:base ebayƒ.sparseimage"

do shell script "hdiutil attach " & quoted form of POSIX path of chemin

Yvan KOENIG (VALLAURIS, France) mercredi 18 janvier 2012 17:13:51

 _______________________________________________
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

  • Follow-Ups:
    • Re: Getting A Folder On An Image Disk
      • From: Luther Fuller <email@hidden>
References: 
 >Getting A Folder On An Image Disk (From: Luther Fuller <email@hidden>)

  • Prev by Date: Getting A Folder On An Image Disk
  • Next by Date: Re: Getting A Folder On An Image Disk
  • Previous by thread: Getting A Folder On An Image Disk
  • Next by thread: Re: Getting A Folder On An Image Disk
  • Index(es):
    • Date
    • Thread