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 

Eject a cd-rom
Goto page 1, 2  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Tekl
Guest





PostPosted: Wed Sep 01, 2004 9:40 pm    Post subject: Eject a cd-rom Reply with quote

Hi,

is it possible to eject cd-roms without any special tools?

Tekl
Back to top
Jon



Joined: 28 Apr 2004
Posts: 373

PostPosted: Wed Sep 01, 2004 11:12 pm    Post subject: Reply with quote

[edit]

Last edited by Jon on Wed Sep 01, 2004 11:31 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
Candle



Joined: 19 Aug 2004
Posts: 334

PostPosted: Wed Sep 01, 2004 11:25 pm    Post subject: Reply with quote

Autoit is
Code:
CDTray("F:", "open")
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10471

PostPosted: Thu Sep 02, 2004 1:40 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Tekl
Guest





PostPosted: Thu Sep 02, 2004 8:02 am    Post subject: Reply with quote

That's cool!

I love AHK! Cool

Tekl
Back to top
savage



Joined: 02 Jul 2004
Posts: 206

PostPosted: Thu Sep 02, 2004 2:16 pm    Post subject: Reply with quote

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 Smile.
Back to top
View user's profile Send private message AIM Address
Tekl
Guest





PostPosted: Thu Sep 02, 2004 2:53 pm    Post subject: Reply with quote

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

PostPosted: Mon Oct 18, 2004 7:46 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10471

PostPosted: Mon Oct 18, 2004 12:11 pm    Post subject: Reply with quote

Thanks, I'll try to get this into the next release.
Back to top
View user's profile Send private message Send e-mail
exhueydriver



Joined: 12 Jul 2004
Posts: 51
Location: Fife,Wa

PostPosted: Mon Oct 18, 2004 3:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10471

PostPosted: Mon Oct 18, 2004 6:54 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Tekl



Joined: 24 Sep 2004
Posts: 813
Location: Germany

PostPosted: Mon Oct 18, 2004 9:19 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10471

PostPosted: Tue Oct 19, 2004 12:28 am    Post subject: Reply with quote

Yes, I should probably add that for completeness. Thanks; it should be done soon.
Back to top
View user's profile Send private message Send e-mail
exhueydriver



Joined: 12 Jul 2004
Posts: 51
Location: Fife,Wa

PostPosted: Tue Oct 19, 2004 12:47 am    Post subject: Reply with quote

Thanks, Chris-
Just tested it on a R/W, and it DOES work!!
Don
Back to top
View user's profile Send private message
Gre



Joined: 12 Oct 2004
Posts: 77
Location: São Paulo ,Brazil

PostPosted: Tue Oct 19, 2004 4:18 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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