I'm into batch programming a little bit and programming games is sorta easy. I just want to know, is there a command that allows you to press a key and something immediately happens? I'm getting sick of only being able to use typing commands all the time. I saw a friend play a Batch game where you could move the character by pressing the WASD keys, not hitting enter at the end.
Yes, the choice command does just this.
Enter choice /? for more info.
Yes, I didn't think of "choice". good answer. Choice is however no longer included with windows, and must alas be downloaded or copped off an older windows version. It still works on xp, but i can't test on seven (machine down). Even choice.com still works on xp, but I would use either choice.exe or win-98/me choice.com versions. If you REALLY want to cheat, you can use debug and make an 8-byte .com file that is equivalent, but of course win-7 etc. don't support debug anymore, so that is also an issue.
b4 07 cd 21 b4 4c cd 21
returns errorlevel equal to whatever key is pressed (without ENTER)
but of course, that is only as long as MS supports "dos" interrupt routines. I figure that is next to go. :-(
nbrane: Choice is however no longer included with windows
It's in Win2K3 and up. If you have WinXP, it was included in some old resource kit(s), but that's an additional download.
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |