Home
Download
Screenshots

Wiki
Plugins
Translations
Developers
Donate

Forums/Help
Contact Us

StrokeIt

Command to eject / insert DVD drive tray?

Posted by Allen 
Allen
Command to eject / insert DVD drive tray?
November 22, 2009 02:19AM
Anyone know if there is a way to make a command to eject / insert the DVD drive tray?
Re: Command to eject / insert DVD drive tray?
November 22, 2009 07:52AM
Hi Allen!

Try this:
http://www.grc.com/wizmo/wizmo.htm
Allen
Re: Command to eject / insert DVD drive tray?
November 26, 2009 03:29AM
thanks and actually its what i have been using so far. :) im hoping the command can be built into strokeit for convenience.
Re: Command to eject / insert DVD drive tray?
November 26, 2009 04:07AM
I'm not sure it is advisable to build everything into StrokeIt that already can be done by other (not inconvenient) means. Opening/closing CD tray is such a thing. Otherwise StrokeIt will quickly become 'stuffed' with a bunch of things that 'seemed a good idea then'.

But then again, if you think it is important to be able to do that without a 3rd party app you could create a plugin for it yourself. Or ask someone to create one ;)

EDIT: some of the required info can be found here:
http://nibuthomas.com/2007/08/17/opening-and-closing-cd-rom-drive/
and/or here:
http://209.85.135.132/search?q=cache:jDcNgU8MaGoJ:www.vbforums.com/archive/index.php/t-466635.html+MCI_SET_DOOR_OPEN&cd=1&hl=hu&ct=clnk&gl=hu



Edited 3 time(s). Last edit at 11/26/2009 04:18AM by gemisigo.
Allen
Re: Command to eject / insert DVD drive tray?
November 30, 2009 12:17PM
i dont consider it bloat. its just eject / insert disc tray which is often used by most people. i use another hotkey program called macro express and they have this functionality built in and i use it a lot. but i prefer not to have to use up a keyboard hotkey if strokeit can make it happen with its own fucntion.
Re: Command to eject / insert DVD drive tray?
December 01, 2009 07:55AM
Are you willing to use an external program? There are several small programs like Wizmo and Nircmd that will do this; you could just call them from an action.

I suspect you could also write a Lua script that calls the Windows API mciSendCommand, but I don't know how to do this myself.
Re: Command to eject / insert DVD drive tray?
December 02, 2009 02:41AM
A good and a bad news :)
The good one first:
MKairys was right, it can be done in Lua, and it is awesome simple. All you have to do is to create a lua script file with the following content:

--!SI:Close CD:CloseCD()
--!SI:Open CD:OpenCD()

function CloseCD()
require [[alien\alien]]
local kolbasz = alien.winmm.mciSendStringA
kolbasz:types{ ret = 'long', abi = 'stdcall', 'string', 'string', 'long', 'long'}
kolbasz("set cdaudio door closed", null, 0, 0)
end

function OpenCD()
require [[alien\alien]]
local kolbasz = alien.winmm.mciSendStringA
kolbasz:types{ ret = 'long', abi = 'stdcall', 'string', 'string', 'long', 'long'}
kolbasz("set cdaudio door open", null, 0, 0)
end

With these you can create Lua commands using the global or re-use environment and Close CD/Open CD as a command.

And the bad news:
Allen, Lua scripting requires enhanced version and while Lua alone is free, enhanced version of StrokeIt is not.
Allen
Re: Command to eject / insert DVD drive tray?
December 11, 2009 06:57AM
optical disc drives aren't going anyway anytime soon. for something as universally useful as this, it would be great to see it as a standard command in strokeit.
Re: Command to eject / insert DVD drive tray?
December 11, 2009 11:40AM
Yes, it would be great. It is also great that one of there most useful applications out there is free for personal use.

We could also mention that spending 10$ (less than 3 Big Macs, according to Big Mac Index ;) to extend StrokeIt's abilities almost beyond measure is really striking a bargain, that's something one can't deny.

I've provided a method so you can see that (enhanced) StrokeIt is able to do that on its own, without a 3rd party utility.
Expecting the personal to be capable of doing everything (i.e. be enhanced) is illogical, isn't it?
If that bothers you so much, you can still create your own plugin for that purpose. And share with us others, of course ;)

Maybe it could even become part of StrokeIt, who knows?

I still think that being able to create you own actions "with sand and cement" is preferable over having StrokeIt with a vast number of definite functions. It' s like Lego. You can build many things with only a few standard bricks but the specially shaped ones are seldom suitable for more than the one task they're designed.
Allen
Re: Command to eject / insert DVD drive tray?
December 13, 2009 02:06PM
is there a windows message command to do the eject / insert DVD drive tray?
Re: Command to eject / insert DVD drive tray?
December 13, 2009 02:37PM
Yep, that was my first idea too, but I didn't find any yet.
Allen
Re: Command to eject / insert DVD drive tray?
January 12, 2010 01:08AM
anyone interested in making a plugin for this?
Author:

Your Email:


Subject:


Spam prevention:
Please, solve the mathematical question and enter the answer in the input field below. This is for blocking bots that try to post this form automatically.
Question: how much is 20 plus 25?
Message: