Re: getting the image file of a mounted disk image
Re: getting the image file of a mounted disk image
- Subject: Re: getting the image file of a mounted disk image
- From: Yvan KOENIG <email@hidden>
- Date: Wed, 19 Jul 2006 09:15:50 +0200
Le 19 juil. 2006 à 04:15, kai a écrit :
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
-----------
Hello
Thanks kai
It seems that I will have to learn UNIX commands ;-)
Yvan KOENIG _______________________________________________
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