Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
accept user input from a batch file without using choice/wscript etc
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Herbert Kleebauer  
View profile  
 More options Feb 13 2007, 3:54 am
Newsgroups: alt.msdos.batch, alt.msdos.batch.win9x-me
From: Herbert Kleebauer <k...@unibwm.de>
Date: Tue, 13 Feb 2007 10:54:18 +0200
Local: Tues, Feb 13 2007 3:54 am
Subject: Re: accept user input from a batch file without using choice/wscript etc

dalu.g...@gmail.com wrote:

> Hi,
> I want to accept user input from a bat file, this can be achieved by
> using choice.com, but this command is not available in all dos
> version. can u please help me out to the same can be achieved by
> writing code that can run in any dos(>ver 4.0)

You can include a choice like program in your batch code:

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@echo off
echo Bj@jzh`0X-`/PPPPPPa(DE(DM(DO(Dh(Ls(Lu(LX(LeZRR]EEEUYRX2Dx=>getkey.com
echo 0DxFP,0Xx.t0P,=XtGsB4o@$?PIyU!WvX0GwUY Wv;ovBX2Gv0ExGIuht6>>getkey.com
echo L?p{KsUWK`LR0x>>getkey.com

getkey.com
if errorlevel  89 if not errorlevel  90 echo Y key pressed
if errorlevel 121 if not errorlevel 122 echo y key pressed
if errorlevel  78 if not errorlevel  79 echo N key pressed
if errorlevel 110 if not errorlevel 111 echo n key pressed
del getkey.com
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Or if you want to input strings:

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@echo off
echo BATCH_INPUT___hgQX-PPP_XPPP E#HH0E50EG0Ef0Ehs>myinput.com
echo myinput.bat hoAX5@@PZYh@xX5@D3!r/P[WX,b,-PZh>>myinput.com
echo X3!X2ErP,{,{PYX4=0ErWX,j,-PZh@@X3!=set input>>myinput.com

echo Enter your name:
myinput.com
call myinput.bat
echo.
echo Hello %input%

del myinput.com
del myinput.bat
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

But if you are speaking of Windows, then there always should be
choice.com or set /p  (maybe with the exception of NT).


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »