Re: Eject CD
Re: Eject CD
- Subject: Re: Eject CD
- From: Luther Fuller <email@hidden>
- Date: Sun, 6 Apr 2008 10:15:01 -0500
On Apr 6, 2008, at 9:47 AM, Michel Raj wrote:
Hi,
Sometimes, when I insert a music CD in my iMac alu, it doesn't mount.
The only way I found to eject it was to use disk utility which sees
the CD.
I was wondering if there was a way to tell the finder to eject the
CD. The problem is to identify it.
A simple
tell finder
eject CD
end tell
Does'nt work. It doesn't know what the CD is. And I don't want to
eject hard disks that are mounted.
Any clue ?
This will work
tell application "Finder" to eject (every disk whose ejectable is true)
provided the disk is mounted. But, your problem seems to involve an
unmounted disk.
This will cause an optical drive to open
do shell script "drutil -drive " & driveNr & " eject"
but you will need the drive number of the optical drive. If you have
only one optical drive, then its drive number = 1, so you can use ...
do shell script "drutil -drive 1 eject"
_______________________________________________
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: | |
| >Eject CD (From: Michel Raj <email@hidden>) |