There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Windows Vista
Tag Cloud
access acer asus bios bsod computer crash desktop driver drivers error ethernet excel freeze gaming hard drive hardware hdmi internet laptop malware memory modem monitor motherboard netgear network printer problem ram registry repair router slow software sound toshiba trojan usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless xbox
Search
Search for:
Tech Support Guy Forums > Operating Systems > Windows Vista >
Solved: Batch choice command help?

Reply  
Thread Tools
Psycoblast's Avatar
Computer Specs
Member with 45 posts.
 
Join Date: Aug 2009
Experience: Advanced Batch Not Expert
06-Nov-2009, 03: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
Distinguished Member with 9,048 posts.
 
Join Date: Aug 2007
Location: Oregon, USA
Experience: Intermediate
06-Nov-2009, 09: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
__________________
Microsoft MVP - Windows Expert - Consumer
Of course I know all the answers ; I just don't always match the answers to the right questions

Psycoblast's Avatar
Computer Specs
Member with 45 posts.
 
Join Date: Aug 2009
Experience: Advanced Batch Not Expert
07-Nov-2009, 12:07 AM #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
Reply

Tags
batch, choice, programming, symbols, vista

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)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 11:27 AM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.