Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Windows Vista Windows Vista
Search Search
Search for:
Tech Support Guy > > >

Solved: Batch choice command help?


(!)

Psycoblast's Avatar
Psycoblast Psycoblast is offline
Computer Specs
Member with 45 posts.
THREAD STARTER
 
Join Date: Aug 2009
Experience: Advanced Batch Not Expert
06-Nov-2009, 02:35 AM #1
Question Solved: Batch choice command help?
Hey guys its me again this time I need help with the batch choice command. I'm making a game and I need more letters to work with. I know how basic letters work heres an example.



Example:

CHOICE /C:ABCDEFGHIJKLMNOPQRSTUVWXYZ > NUL

but is it possible to seperate lower case from upper case???
by adding a shift key with all the letters a-z or somthing to that effect?

Also how about symbols such as !@#$%mainly these !@#$%^&*.

Sorry for such a stupied question but thanks anyways guys.

-Psycoblast
TheOutcaste's Avatar
Computer Specs
Member with 9,028 posts.
 
Join Date: Aug 2007
Location: Oregon, USA
Experience: Intermediate
06-Nov-2009, 08:18 AM #2
The valid choice characters are: a-z, A-Z, 0-9 and ASCII values of 128 to 254
The alphanumeric keys give you 62 choices.

Add the /CS switch to make it Case Sensitive. (Choice /? shows this)
To enter the ASCII codes, you need to use the Dos EDIT program to edit the file and add those.
To edit the file using Edit, open a prompt and type:
Edit mychoice.bat

To enter the characters from 128-254, hold the ALT key and enter the 3 digit number on the Numeric key pad (you can't use the number keys above the alphabet keys).
The character will be entered when you release the ALT key.
You may have to use the left ALT key depending on your Language settings. On a laptop, you may have to turn on the embedded Numeric keypad, as ALT+FN+XXX doesn't always work.

The characters that are displayed in say Notepad or other text editors will not match what you see in the prompt either.
This is ALT+128 as seen in Notepad:

This is what it looks like in the Command Prompt:


And you do know that choice is not included with NT/Win2K/XP? And the WinME version will allow some punctuation, but the case sensitive switch is just /S, not /CS

HTH

Jerry
Psycoblast's Avatar
Psycoblast Psycoblast is offline
Computer Specs
Member with 45 posts.
THREAD STARTER
 
Join Date: Aug 2009
Experience: Advanced Batch Not Expert
06-Nov-2009, 11:07 PM #3
Talking Thank you!!!
Thanks i've been sarching the answer to this question for a very long time. I knew about the alt trick but never thought of using it in batch thanks again!!!

-Psycoblast
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
WELCOME TO TECH SUPPORT GUY!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.


Tags
batch, choice, programming, symbols, vista

(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑