Re: Eject image
Re: Eject image
- Subject: Re: Eject image
- From: Robert Poland <email@hidden>
- Date: Thu, 28 Feb 2013 10:58:21 -0700
On Feb 28, 2013, at 10:53 AM, Luther Fuller <email@hidden> wrote:
> On Feb 28, 2013, at 11:44 AM, Christopher Stone wrote:
>
>> if (do shell script "hdiutil info") contains "TEST.sparseimage" then
>> tell application "Finder"
>> eject disk "TEST"
>> end tell
>> end if
>
> Careful. The name of the image file may NOT be the name of the image disk it mounts.
> (The user can change the name of the image file in the Finder.)
You're right that caught me. Changed the names to match,
>> Or you can narrow down the contents:
>>
>> (do shell script "hdiutil info | sed -En '/^image-path/p'")
>
> A very good alternative.
Robert Poland - Fort Collins, CO
_______________________________________________
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