• 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 the image file of a mounted disk image
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting the image file of a mounted disk image


  • Subject: Re: getting the image file of a mounted disk image
  • From: Jason Davies <email@hidden>
  • Date: Thu, 7 Sep 2006 15:07:30 +0100

you sent this ages ago to the Applescript list in response to my query and I've just got to testing it (it was thrown by a line break within quotation marks when i first ran it!) and it works beautifully - many thanks.

> On 18 Jul 2006, at 19:58, Yvan KOENIG wrote:
>
> > I really don't understand how it works but I must admit that I was
> > wrong.
>
> I wouldn't know about the specifics of that particular example, Yvan
> - although something like this should also do the trick:
>
> -----------
>
> set {l, f} to {{}, do shell script "/usr/bin/hdiutil info"}
> tell application "System Events" to considering case
>   repeat with i in (get POSIX path of disks where it is ejectable)
>       if i is in f then set l's end to i
>   end repeat
> end considering
> if (count l) is 0 then return beep
> set l to choose from list l with prompt "Choose a mounted disk image:"
> if l is false then return
> set {l, text item delimiters} to {text item delimiters, l's item 1 &
> return}
> set {f, text item delimiters} to {f's text item 1, return & "image-
> path      : "}
> set {f, text item delimiters} to {paragraph 1 of f's text item -1 as
> POSIX file, l}
> tell application "Finder" to try
>   reveal f
>   activate
> end try
>
> -----------
>
> ---
> kai
>
>
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Applescript-users mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> 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:

This email sent to email@hidden

  • Prev by Date: Re: Importing/parsing CSV files
  • Next by Date: Re: Importing/parsing CSV files
  • Previous by thread: Re: Power Supply
  • Next by thread: GUI scripting for Illustrator: Trouble!
  • Index(es):
    • Date
    • Thread