VOGONS

Common searches


Creating a batch file with more than 10 options

Topic actions

  • This topic is locked. You cannot reply or edit posts.

Reply 20 of 25, by konc

User metadata
Rank l33t
Rank
l33t

Since OP "is not a coder", let me propose something much simpler that gets the job done:
main .bat contains ONLY the echos and then exits

echo 1.College Basketball
echo 2.Baseball
echo 3.Football

Then create separate batch files that launch each game named 1.bat, 2.bat, ...

Reply 21 of 25, by Roger Wilco

User metadata
Rank Newbie
Rank
Newbie

OP allready knew about choice having more than 10 possiblities. It's a quite lengthy discussion in the reddit link posted.
It's all a little confusing, tbh.
So I suggested using Freedos, as set / p offers more freedom and OP allready seemed to know at least something about it.
For whatever that leads to 😉

Reply 22 of 25, by Lemur21

User metadata
Rank Newbie
Rank
Newbie

Sorry for my delay in replying. I (along with someone from the reddit link) did figure out a way to make it work.

We do use set /p. The key is - instead of launching it through config file of DosBox, we launch from the CMD prompt, and call DosBox to launch from there.

Functionally, I could have 400+ entries -- it prompts me for the choice (currently, I can type 1-14, but I could go to any number I wanted) and then - quickly launches DosBox, mounts the drive and launches the game. When I exit the game, it brings me back to the menu.

The person I worked with was exceptional -- beyond being extremely knowledgeable, his ability to explain provided me with an understanding (to the point that I began figuring things out for myself, eventually) -- that's a fantastic trait (and I've told him so).

I realized, early on, the limitations of DosBox wouldn't limit the ability to launch the process outside of DosBox, and then, call the exe from there.

Reply 23 of 25, by ant_ness

User metadata
Rank Newbie
Rank
Newbie

Hi

Not sure if you can help

I've looked through the discussion threads

I've set up a games menu batch file in dosbox which works well with numeric choices 1-9.

I've exchanged the numbers for letters to increase my options above 9, but then nothing works?

Any suggestions would be appreciated

Attachments

Reply 24 of 25, by dr_st

User metadata
Rank l33t
Rank
l33t

The errorlevel should always be a number. The number corresponds to the placement of the character in the choice string.

So, for example if you use choice /cqwertyuiopasdfghjkl then errorlevel 1 corresponds to q, errorlevel 2 to w, and so on. In that example, p would be errorlevel 10, k errorlevel 18.

https://cloakedthargoid.wordpress.com/ - Random content on hardware, software, games and toys

Reply 25 of 25, by Cluelessnoob

User metadata
Rank Newbie
Rank
Newbie

A simple solution would be to limit the number of options on the menu page to 1 game less than the number allowed by the bat limit, have the limit number call another bat file to list the next list of games with the same option, Sort of like a menu calling another menu. Of course, if you are looking for an easier way to find and run games you can create shortcuts.