| View previous topic :: View next topic |
| Author |
Message |
Tekl Guest
|
Posted: Wed Sep 01, 2004 9:40 pm Post subject: Eject a cd-rom |
|
|
Hi,
is it possible to eject cd-roms without any special tools?
Tekl |
|
| Back to top |
|
 |
Jon
Joined: 28 Apr 2004 Posts: 373
|
Posted: Wed Sep 01, 2004 11:12 pm Post subject: |
|
|
[edit]
Last edited by Jon on Wed Sep 01, 2004 11:31 pm; edited 1 time in total |
|
| Back to top |
|
 |
Candle
Joined: 19 Aug 2004 Posts: 334
|
Posted: Wed Sep 01, 2004 11:25 pm Post subject: |
|
|
Autoit is | Code: | | CDTray("F:", "open") |
|
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10471
|
Posted: Thu Sep 02, 2004 1:40 am Post subject: |
|
|
| There's nothing built-in yet, but if it's easy to adapt the code from AutoIt I'll try to get it done soon. |
|
| Back to top |
|
 |
Tekl Guest
|
Posted: Thu Sep 02, 2004 8:02 am Post subject: |
|
|
That's cool!
I love AHK!
Tekl |
|
| Back to top |
|
 |
savage
Joined: 02 Jul 2004 Posts: 206
|
Posted: Thu Sep 02, 2004 2:16 pm Post subject: |
|
|
In the mean time I suppose you could use this little command line tool.
It also lets you clsoe the tray.
Command line tools are convenient for extending the capabilities of ahk . |
|
| Back to top |
|
 |
Tekl Guest
|
Posted: Thu Sep 02, 2004 2:53 pm Post subject: |
|
|
Thanks, but I already have tool for that, but I thought it could be possible directly within AHK.
Tekl |
|
| Back to top |
|
 |
Tekl
Joined: 24 Sep 2004 Posts: 813 Location: Germany
|
Posted: Mon Oct 18, 2004 7:46 am Post subject: |
|
|
Hi,
are there any news about implementing media-eject? The link above does not work. Is it maybe possible with postmessage?
Tekl |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10471
|
Posted: Mon Oct 18, 2004 12:11 pm Post subject: |
|
|
| Thanks, I'll try to get this into the next release. |
|
| Back to top |
|
 |
exhueydriver
Joined: 12 Jul 2004 Posts: 51 Location: Fife,Wa
|
Posted: Mon Oct 18, 2004 3:43 pm Post subject: |
|
|
Would it be possible to make it eject a CD-RW? With a
CD-ROM, you can push the button on the machine, with a RW, you have to
r-click on the icon, select Eject. A hotkry would be nice.
Thanx
Don |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10471
|
Posted: Mon Oct 18, 2004 6:54 pm Post subject: |
|
|
This was overdue so has been added to the installer at http://www.autohotkey.com/download/
The syntax is:
Drive, Eject ; eject the default drive
Drive, Eject,, 1 ; retract the default drive
Drive, Eject, E: [, 1] ; eject/retract a named drive
| Quote: | | Would it be possible to make it eject a CD-RW? | I think it should work on all types of CD and DVD drives that can play music CDs. |
|
| Back to top |
|
 |
Tekl
Joined: 24 Sep 2004 Posts: 813 Location: Germany
|
Posted: Mon Oct 18, 2004 9:19 pm Post subject: |
|
|
Thanks Chris,
is it possible to get the status if a drive is open or close? I want a key which opens the drive and the I want to close the drive with the same key.
Tekl |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10471
|
Posted: Tue Oct 19, 2004 12:28 am Post subject: |
|
|
| Yes, I should probably add that for completeness. Thanks; it should be done soon. |
|
| Back to top |
|
 |
exhueydriver
Joined: 12 Jul 2004 Posts: 51 Location: Fife,Wa
|
Posted: Tue Oct 19, 2004 12:47 am Post subject: |
|
|
Thanks, Chris-
Just tested it on a R/W, and it DOES work!!
Don |
|
| Back to top |
|
 |
Gre
Joined: 12 Oct 2004 Posts: 77 Location: São Paulo ,Brazil
|
Posted: Tue Oct 19, 2004 4:18 am Post subject: |
|
|
You can open or close using only one hotkey with this code:
| Code: | ^#0::
Drive, Eject,,
If ErrorLevel = 0 ;just in case
If A_TimeSinceThisHotkey < 1000 , Drive, Eject,, 1
Return |
The variable A_TimeSinceThisHotkey in my case is always > 1000ms if the script must change "drive state".
I was using a commandline tool ,this way is much better!Thanks Chris. |
|
| Back to top |
|
 |
|