Solved How to make character move in batch without pressing enter?

October 18, 2012 at 10:26:02
Specs: Windows 7
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.

See More: How to make character move in batch without pressing enter?

Report •

#1
October 18, 2012 at 11:08:17
✔ Best Answer
Yes, the choice command does just this.
Enter choice /? for more info.

Report •

#2
October 18, 2012 at 18:19:45
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. :-(

Report •

#3
October 18, 2012 at 20:00:58
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.

How To Ask Questions The Smart Way


Report •
Related Solutions


Ask Question