AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Drive, Eject,, Toggle

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
beardboy



Joined: 02 Mar 2004
Posts: 444
Location: SLC, Utah

PostPosted: Tue Oct 19, 2004 8:39 pm    Post subject: Drive, Eject,, Toggle Reply with quote

Could an option be added to the new Drive command to Toggle the CDRom? If it is open, close it. If it is closed, open it. I know this can be done with errorlevel checks, but one command would be more simple.

thanks,
beardboy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10464

PostPosted: Tue Oct 19, 2004 9:04 pm    Post subject: Reply with quote

I haven't found a way yet to detect the state of the drive's tray. But Gre provided this nice script that seems to work pretty well as a "toggle":
Code:
#c::
Drive, Eject
; If the command completed quickly, the tray was probably already ejected.
; In that case, retract it:
if A_TimeSinceThisHotkey < 1000 ; Adjust this time if needed.
     Drive, Eject,, 1
return
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group