A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Windows 10 » Windows 10 Help Forum
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How do you make a batch file accept 1-char keyboard input WITHOUT having to also press carriage return?



 
 
Thread Tools Rate Thread Display Modes
  #16  
Old May 30th 18, 06:09 PM posted to alt.comp.os.windows-10,microsoft.public.windowsxp.general,alt.windows7.general
Java Jive
external usenet poster
 
Posts: 391
Default How do you make a batch file accept 1-char keyboard input WITHOUThaving to also press carriage return?

On 30/05/2018 16:16, Char Jackson wrote:

On Wed, 30 May 2018 12:15:43 +0100, Java Jive
wrote:

On 30/05/2018 08:11, Ralph Fox wrote:

Be aware that CHOICE is not supported in Windows XP.


Nonsense, as in ...

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\TEMPchoice /?
CHOICE [/C[:]choices] [/N] [/S] [/T[:]c,nn] [text]

/C[:]choices Specifies allowable keys. Default is YN
/N Do not display choices and ? at end of prompt string.
/S Treat choice keys as case sensitive.
/T[:]c,nn Default choice to c after nn seconds
text Prompt string to display

ERRORLEVEL is set to offset of key user presses in choices.


My XP VM reports the following:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\TEMPchoice /?
'choice' is not recognized as an internal or external command,
operable program or batch file.


You're right.

My build was originally a W2k build on a P4 desktop which was reimaged
onto a laptop and upgraded to XP, so at the time of my previous post, I
made a point of searching the Windows directory for extra files that
might be giving the functionality, but in fact CHOICE.EXE is in the W2k
Resource Kit folder under Program Files, which is on my path. I suspect
that similarly it would be available from the XP Resource Kit, but what
bloody arseholes they are, removing something as *useful* as that!

Apologies for increasing the level of confusion.
Ads
  #17  
Old May 30th 18, 06:14 PM posted to alt.comp.os.windows-10,microsoft.public.windowsxp.general,alt.windows7.general
Frank Slootweg
external usenet poster
 
Posts: 1,226
Default How do you make a batch file accept 1-char keyboard input WITHOUT having to also press carriage return?

Char Jackson wrote:
On Wed, 30 May 2018 12:15:43 +0100, Java Jive
wrote:

On 30/05/2018 08:11, Ralph Fox wrote:

Be aware that CHOICE is not supported in Windows XP.


Nonsense, as in ...

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\TEMPchoice /?
CHOICE [/C[:]choices] [/N] [/S] [/T[:]c,nn] [text]

/C[:]choices Specifies allowable keys. Default is YN
/N Do not display choices and ? at end of prompt string.
/S Treat choice keys as case sensitive.
/T[:]c,nn Default choice to c after nn seconds
text Prompt string to display

ERRORLEVEL is set to offset of key user presses in choices.


My XP VM reports the following:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\TEMPchoice /?
'choice' is not recognized as an internal or external command,
operable program or batch file.


Hmmm!? This page is somewhat ambiguous, but says "Windows XP and
earlier syntax" (Generally the ComputerHope 'DOS' pages are quite
accurate.):

https://www.computerhope.com/choicehl.htm

[Too much trouble to fetch my dormant XP machine, but if really needed,
I can get it, fire it up and try.]
  #18  
Old May 31st 18, 01:11 AM posted to alt.comp.os.windows-10,microsoft.public.windowsxp.general,alt.windows7.general
Sjouke Burry[_2_]
external usenet poster
 
Posts: 275
Default How do you make a batch file accept 1-char keyboard input WITHOUThaving to also press carriage return?

On 30-5-2018 13:15, Java Jive wrote:
On 30/05/2018 08:11, Ralph Fox wrote:

Be aware that CHOICE is not supported in Windows XP.


Nonsense, as in ...

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\TEMPchoice /?
CHOICE [/C[:]choices] [/N] [/S] [/T[:]c,nn] [text]

/C[:]choices Specifies allowable keys. Default is YN
/N Do not display choices and ? at end of prompt string.
/S Treat choice keys as case sensitive.
/T[:]c,nn Default choice to c after nn seconds
text Prompt string to display

ERRORLEVEL is set to offset of key user presses in choices.


?????????????????????????????????????????????????? ?????????
my XP PRO sp3:
C:\01-sjouke\testchoice /?
choice wordt niet herkend als een interne
of externe opdracht, programma of batchbestand.

C:\01-sjouke\test
Translated:NOT RECOGNIZED!!!!!

In dos 6.22 it does work.
 




Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off






All times are GMT +1. The time now is 04:02 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.