Need script to open CD tray

How can I make a clickable AppleScript that will open the CD tray on my G5 when there is no disc in it? (I have very old keyboard, which I use for ergonomic reasons, but it has neither an eject key nor any function keys.)

If you’re on Mac OS 10.3+, try this:

Jon


[This script was automatically tagged for color coded syntax by Convert Script to Markup Code]

It doesn’t appear that you can query the drutil for the status of the tray (though I’m not sure of this, my test machine is a PB without a tray) but you could use the following script saved as an app to toggle the tray open and shut. See the comment about removing the user interaction:

Jon


[This script was automatically tagged for color coded syntax by Convert Script to Markup Code]

Hi,

Also, did you know that you can add an eject icon to the menu bar? Double click on this menu to add the icon:

“Macintosh HD:System:Library:CoreServices:Menu Extras:Eject.menu:”

or search for eject.menu.

gl,

But kel, why do something the easy way when you can script it?

Jon

…besides, if you script it and put an icon for the app on the dock, it only takes a click to activate it. the menu icon requires a click and then a selection. it may seem like a petty difference, but for those of us with mouse-itis, it’s a significant one. :slight_smile:

Yes, but then you have to wait while it bounces in the dock. Ah ha!