Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

eyoungren

macrumors Nehalem
Original poster
Aug 31, 2011
30,393
30,158
I have an external USB 2.0 burner attached to my G4 and it has always bugged me that the OPTN+Eject key combination does not work to eject the drive tray.

Tonight I found this:
Code:
set home to path to home folder as string
set mypath to home & ".discCheck"
set testVar to true
try
	set mypath to mypath as alias
on error
	set testVar to false
end try

if testVar is true then
	do shell script "drutil tray eject -drive usb; rm -f ~/.discCheck"
else
	do shell script "drutil tray close -drive usb; touch ~/.discCheck"
end if

It's Applescript that calls a shell script. It will open the drive tray if it is closed and close the drive tray if it is open.

I've attached OPTN+F12 to it as a shortcut in FastScripts because for whatever reason OPTN+eject won't register (if anyone knows how to make that work, let me know).

In any case, enter this into Script Editor and save some place if you want to use it.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.