View Single Post
  #17  
Old May 30th 18, 08:57 AM posted to alt.comp.os.windows-10,microsoft.public.windowsxp.general,alt.windows7.general
Ralph Fox
external usenet poster
 
Posts: 474
Default How do you make a batch file accept 1-char keyboard input WITHOUT having to also press carriage return?

On Wed, 30 May 2018 07:45:54 +0000 (UTC), Bob J Jones wrote:

In , Ralph Fox
wrote:

You cross-posted to the XP newsgroup, so I would guess that you also want
the batch script to run in XP.

Be aware that CHOICE is not supported in Windows XP.


A simple switch can solve that, don't you think?
The default would be set to WINXP compatible.
If the user changes that switch to anything other than WINXP, then the
CHOIC code runs.

Something like this Pseudocode:

set defos=WINXP
if defos not WINXP then run CHOICE commands
else run default SET /P commands

Does that make sense to you as a general game plan?



Yes, that makes sense.

--
Kind regards
Ralph
Ads