Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A script to open/close an external CD/DVD via keyboard' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A script to open/close an external CD/DVD via keyboard
Authored by: jimhoyt on Feb 15, '05 03:59:57PM
If you've just got one external drive you could just fire off this Applescript:

property drawerstatus : true

if drawerstatus is true then
    do shell script "drutil eject -drive external"
else
    do shell script "drutil tray close -drive external"
end if
set drawerstatus to not drawerstatus
Attach it to a key using System Preferences or your method of choice. The first press will open the tray and the next will close it. Worst case, it takes two presses if something interferes with the tray.

[ Reply to This | # ]
A script to open/close an external CD/DVD via keyboard
Authored by: mark hunte on Feb 15, '05 04:59:11PM

I have tried before to attach a script to keys using the keyboard and mouse prefs. but never could get it to work. any clues as to how to do this.


---
mh



[ Reply to This | # ]