 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
beardboy
Joined: 02 Mar 2004 Posts: 444 Location: SLC, Utah
|
Posted: Tue Oct 19, 2004 8:39 pm Post subject: Drive, Eject,, Toggle |
|
|
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 |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10464
|
Posted: Tue Oct 19, 2004 9:04 pm Post subject: |
|
|
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 |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|