Home Download Screenshots Wiki Plugins Translations Developers Donate Forums/Help Contact Us |
StrokeIt
Command to eject / insert DVD drive tray?Posted by Allen
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.
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.
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.
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.
|