|
|
A script to open/close an external CD/DVD via keyboard
This is a nice way to open the external drive.
Filter by bus type (FireWire, ATAPI)
The change is fairly simple. Instead of relying on vendors, it would be better to filter by the bus type (the internal ATA, or external FireWire or USB):
#!/bin/sh
##==================================================
# opensesame -- open/close external optical drives
##==================================================
if [ -z $(uname -r | grep "7.") ]; then
echo "Sorry, $(basename $0) require OS X 10.3+"
exit 1
fi
if [ -z "$1" ]; then
echo "usage: $(basename $0) -c (closes external optical drive)"
echo " $(basename $0) -o (opens external optical drive)"
exit 1
fi
theDRIVE=$(/usr/bin/drutil list | awk '/(FireWire)|(USB)/ {print $1}')
if [ "$1" = "-c" ]; then
drutil tray close -drive $theDRIVE
elif [ "$1" = "-o" ]; then
drutil eject -drive $theDRIVE
fi
A script to open/close an external CD/DVD via keyboard
I believe that if you replace the "LITE_ON" with "PIONEER DVD-RW DVR-104" that the DVR-104 would be controled by the bash script. You may have to escape the spaces to be something along the lines of "\ " I can't test this due to lack of Mac access at the moment, but it should work.
A script to open/close an external CD/DVD via keyboard
For does who have only one external you could use
A script to open/close an external CD/DVD via keyboard
If you've just got one external drive you could just fire off this Applescript:
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.
A script to open/close an external CD/DVD via keyboard
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.
A script to open/close an external CD/DVD via keyboard
My understanding is that this will only work with a "burner" drive. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.08 seconds |
|