VOGONS


First post, by Matans

User metadata
Rank Newbie
Rank
Newbie

I edited DOSBox configuration to do the following:

[autoexec]
# Lines in this section will be run at startup.
rem @echo=off

mount c C:\DosGames
c:\

:menu
cls
echo 1.temp1
echo 2.temp2
echo 3.temp3
echo 4.exit
set /p choice="select a number between 1 and 3"

if "%choice%"=="1" goto temp1
if "%choice%"=="2" goto temp2
if "%choice%"=="3" goto temp3
if "%choice%"=="4" goto exit
echo Error: Invalid choice.
pause
goto menu

:temp1
echo 1
pause
goto exit

:temp2
echo 2
pause
goto exit

:temp3
echo 3
pause
goto exit

:exit
exit

The system hangs with the "Error: Invalid choice" pause, and doesnt wait for any input.
Help please! 😢

Last edited by Matans on 2009-09-27, 12:09. Edited 1 time in total.

“It takes a big man to cry, but it takes a bigger man to laugh at that man.” (Jack Handey)

Reply 1 of 6, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

dosbox version? OS?

Reply 2 of 6, by Matans

User metadata
Rank Newbie
Rank
Newbie

DOSBox 0.73
WinXP Pro

“It takes a big man to cry, but it takes a bigger man to laugh at that man.” (Jack Handey)

Reply 3 of 6, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

set /p is not valid under msdos.

Reply 4 of 6, by Matans

User metadata
Rank Newbie
Rank
Newbie

Thanks.

Is there an alternative?

“It takes a big man to cry, but it takes a bigger man to laugh at that man.” (Jack Handey)

Reply 5 of 6, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

choice /c:123
and checking errorlevel or something like that

Reply 6 of 6, by Matans

User metadata
Rank Newbie
Rank
Newbie

Works like a charm 😁

Cheers mate!!

“It takes a big man to cry, but it takes a bigger man to laugh at that man.” (Jack Handey)