Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: 10 options  (Read 2498 times)

0 Members and 1 Guest are viewing this topic.

almn

  • Guest
10 options
« on: June 11, 2006, 07:14:55 PM »
Hello,

I would like to know how to ask for the user input with more then 10 options.So far I have tried:

echo 1-
echo 2-
echo 3-
echo 4-
echo 5-
echo 6-
echo 7-
echo 8-
echo 9-
echo 0- Options
CHOICE /n /C:1234567890 Choose the Action you want to Perform :

echo 1-
echo 2-
echo 3-
echo 4-
echo 5-
echo 6-
echo 7-
echo 8-
echo 9-
CHOICE /n /C:123456789 Choose the Action you want to Perform :

But that doesn't work I get the second set of optiopns what ever option I choose for the first choice.

Thank You

Almn

GuruGary



    Adviser
    Re: 10 options
    « Reply #1 on: June 11, 2006, 10:45:26 PM »
    How about something like:
    Code: [Select]
    @echo off
    echo A-  
    echo B-
    echo C-  
    echo D-  
    echo E-  
    echo F-  
    echo G-  
    echo H-
    echo I-  
    echo J-  
    echo K-
    echo L-  
    echo M-  
    echo N-  
    echo O-  
    echo P-  
    echo Q-
    echo R-  
    echo Z- Options
    CHOICE /n /C:ABCDEFGHIJKLMNOPRQZ Choose the Action you want to Perform :

    almn

    • Guest
    Re: 10 options
    « Reply #2 on: June 12, 2006, 04:53:21 AM »
    ok thank you
    But what if I gave more than 24 options then ??

    Thank You

    Almn

    Sidewinder



      Guru

      Thanked: 139
    • Experience: Familiar
    • OS: Windows 10
    Re: 10 options
    « Reply #3 on: June 12, 2006, 05:36:21 AM »
    CHOICE has an /s switch which makes your choices case sensitive. This should up your options to 62 (upper and lower case alpha plus ten digits).

    What are you doing that you need so many options for?

     8-)

    Curious: I thought you were running the French version of XP. CHOICE has not shipped with any of the Windows NT family.
    « Last Edit: June 12, 2006, 08:27:58 AM by Sidewinder »
    The true sign of intelligence is not knowledge but imagination.

    -- Albert Einstein

    GuruGary



      Adviser
      Re: 10 options
      « Reply #4 on: June 12, 2006, 11:32:25 AM »
      Sidewinder has a good soultion.  

      Also, if you have more than about 24 options, then they will probably start scrolling off your screen (unless you create multiple columns, or expand on the default number of rows).  If you have that many, I would try to group them and have sub choices under the groups.