Mourning the loss of our friend, WhitPhil.
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
 
Windows Vista
Tag Cloud
access audio blue screen boot bsod connection crash dell desktop driver drivers dvd email error excel firefox hard drive hardware hijackthis internet keyboard laptop malware monitor motherboard network networking outlook problem processor ram recovery router screen slow sound spyware tdlwsp.dll trojan upgrade vba video virus vista vundo windows windows 7 windows vista windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Windows Vista >
Solved: Batch choice command help?

Tip: Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]

 
Thread Tools
Psycoblast's Avatar
Computer Specs
Junior Member with 7 posts.
 
Join Date: Aug 2009
Experience: I'm Advanced in batch
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
Distinguished Member with 5,486 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
__________________
Microsoft MVP - Windows Desktop Experience
Of course I know all the answers ; I just don't always match the answers to the right questions
Are you aware of the New Signature Limitations?
Psycoblast's Avatar
Computer Specs
Junior Member with 7 posts.
 
Join Date: Aug 2009
Experience: I'm Advanced in batch
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
Reply Bookmark and Share

Tags
batch, choice, programming, symbols, vista

Smart Search

Find your solution!



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


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 02:12 AM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.
Powered by Cermak Technologies, Inc.