 |
 |
Eject DVD using Applescript?
|
 |
|
 |
|
Professional Poster
Join Date: Jan 2001
Location: Between Sydney and Melbourne
Status:
Offline
|
|
Any idea how to do this?
The eject command needs you name the volume, I just want to eject any DVD in the drive?
Thanks.
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Feb 2007
Location: California
Status:
Offline
|
|
IF you can integrate this to apple script it should work.
1. Type the command drutil list into the Terminal and press return . This will provide a list of all currently connected removable devices. -- connect FireWire/USB drives for this
2. Use the command drutil tray eject 1
In the above command, the number "1" should be replaced with whatever drive number you obtained in the first step.
(Last edited by PSXBatou; Feb 18, 2007 at 03:17 AM.
)
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Jan 2001
Location: Between Sydney and Melbourne
Status:
Offline
|
|
Wow, thats great thanks!
One more thing, I don't know if this is possible but can you suggest a way to check if the drive tray is open?
I want to do this
if drive tray is open then
do shell script "drutil tray close 1"
else
do shell script "drutil tray eject 1" end if
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Feb 2007
Location: California
Status:
Offline
|
|
Originally Posted by moonmonkey
Wow, thats great thanks!
One more thing, I don't know if this is possible but can you suggest a way to check if the drive tray is open?
I want to do this
if drive tray is open then
do shell script "drutil tray close 1"
else
do shell script "drutil tray eject 1" end if
It should work, give it a shot. If it does let me know (and give me a copy of the script please) 
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Jan 2001
Location: Between Sydney and Melbourne
Status:
Offline
|
|
Any idea on how to check if the drive is open?
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Oct 2004
Location: Portugal
Status:
Offline
|
|
try this (save as appescript and run it):
(it still doesn't check if the tray is open, but can do both the open and close...)
property last_choice : "Open"
--comment out the next line to have it run without user interaction:
set last_choice to button returned of (display dialog "Open or close the drive tray?" buttons {"Close", "Open"} default button last_choice with icon 1)
if last_choice = "Open" then
do shell script "drutil tray open -drive 1"
set last_choice to "Close"
else
do shell script "drutil tray close -drive 1"
set last_choice to "Open"
end if
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |