1.

Solve : can u make a bat file check for any keyboard buttons being hit?

Answer»

i wuz wondering if there is a way for a bat file the look for if any keyboard key was pressed.
not talking about the "pause" command.
but this is wat i want
1st the bat file waits until a CERTAIN button(on keyboard) was pressed(the button would be specified in the bat file)
2nd the bat file responds to the certain button eg.
An FPS GAME
Fire - CTRL
Jump - Space
and so on and so forth.
plz respondQuote from: macdad- on February 20, 2008, 01:59:55 PM

i wuz wondering if there is a way for a bat file the look for if any keyboard key was pressed.
not talking about the "pause" command.
but this is wat i want
1st the bat file waits until a certain button(on keyboard) was pressed(the button would be specified in the bat file)
2nd the bat file responds to the certain button eg.

I haven't gone and researched this - it is just something that I remember from way back in my memory.
Do a Google search for GETKEY . It should be a free dos utility program.

You'll need to read whatever docs you can find with it, along with whatever help the program itself might provide.
Hint: Often with Dos util programs, you can get the program itself to output some BRIEF help to the screen with filename /? or filename -h .

Play with GetKey. Set it up in a batch file, and have your batch file trap for returned errorlevels. (If you don't know what the previous sentence means, just ask.)


Quote
An FPS game
Fire - CTRL
Jump - Space
and so on and so forth.
plz respond

I don't know what that part is about, so I won't comment on it.


Here.... I googled it quickly. You can grab a few utils here, including GetKey.
http://ourworld.compuserve.com/homepages/ken

Have fun learning!


the "An FPS Game" was an example the Fire -CTRL and other things were examples on the getkey thing u were talking about
dude i went to that website, downloaded the file and i now realize u are a complete

GENIUS!!!!!!!!!!!!!!
the utilities solved my problem and also showed me how to Jazz up my bat files THANKS!
Quote from: macdad- on February 20, 2008, 05:43:31 PM
dude i went to that website, downloaded the file and i now realize u are a complete

GENIUS!!!!!!!!!!!!!!




Actually, I'm not. In comparison (to you, I suspect) - what I am, is old .


What that really means is that I've just had more time to accumulate experience(s).
As far as computers and especially batch files go, I've played with a lot of old stuff. And a lot of convoluted batch files. But that was a while back.

Quote
the utilities solved my problem and also showed me how to Jazz up my bat files THANKS!


Having read your post here, and I believe some others AROUND here - in which you'd asked "How do I....?" type questions, I read between the lines and thought that some handy-dandy third party utility type programs are what you need to learn to look for and learn to use.... to accomplish some of the things you want to do.
GetKey is an example of one of those good ol' util programs.
And it does a lot more that I thought you might like to fiddle around with.

You should know that this stuff is considered out of date. Obsolete. Passe.
I'm saying that in fairness.
That does not mean that it is not good stuff to learn. Learning exercises the mind. Can't hurt you.
Besides.... if you spend a bunch of time on a project, and learn how to do it, only to later discover that there was a more modern way to do the job..... well, that in itself is a learning experience too!


I hope you have some fun, and enjoy whatever you learn.



Discussion

No Comment Found