my batch

i have been playing around with batch coding for a month now and i finaly finished and figered out everything i need to do to get this to work. so here it is.

@ECHO OFF
color 0a
:top
echo -----------------------------------------------
echo type the number 1 for a number guessing game
echo type the number 2 for a calculator
echo type the number 3 to see a dumb thing a made up.
echo type the number 4 to exit.
echo this is a free-to-use program
echo give all credit to dsman1
echo do not edit with out dsman1's consent
echo -----------------------------------------------
set variable1=1
set variable2=y
set variable3=n
set variable4=3
set variable5=2
set variable7=0
set variable9=4
set /p udefine=
if %udefine%==%variable1% (
goto game
)
if %udefine%==%variable5% (
goto calc
)
if %udefine%==%variable4% (
goto starwars
)
if %udefine%==%variable9% (
exit
)
:calc
echo hi and wellcome to calcualtor
echo credit for programing goes to dsman1
echo -----------------------------------------------
echo mutiply = *
echo divide = /
echo add = +
echo subtract= -
echo parenthesis can be in your problems.
:loop
echo -----------------------------------------------
SET /p UDefine=
echo =
SET /a UDefine=%UDefine%
ECHO %UDefine%
echo math is fun
ECHO.
echo again? y/n
set /p udefine=
if %udefine%==%variable2% (
goto loop
) else (
goto top
)
:game
@ECHO OFF
SET /a GuessNum=0
SET /a Answer=%random%
ECHO Guess what Number I'm thinking of.
:Retry
SET /p Guess=
IF %Guess% LSS %Answer% ECHO My Number is Higher.
IF %Guess% GTR %Answer% ECHO My Number is Lower.
IF %Guess%==%Answer% GOTO END
ECHO.
SET /a GuessNum=%GuessNum%+1
GOTO Retry
:END
ECHO You are Correct! The Answer was %Answer%
ECHO It took %GuessNum% Guesses.
ECHO.
echo play again? y/n
set /p udefine=
if %udefine%==%variable2% (
goto game
) else (
goto top
)
:starwars
echo dont press a button
pause
echo ok please
pause
echo please with suger on top
pause
echo ok come on now
pause
echo you are just trying to irritate me
pause
echo and it's working...
pause
echo i will blow you up in...
pause
echo 5
pause
echo 4
pause
echo 3
pause
echo 2
pause
echo 1
pause
echo boom!!!
pause
echo haha
pause
echo your dead!
pause
echo try to push a button now!
pause
echo darn
pause
echo
echo / you will die mortal \
echo / mahaha \
echo / \
echo
pause
set /a variable6=500
:hehe
set /a variable6=%variable6%-1
echo hahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahahaha
if %variable6%==0 goto :haha
goto hehe
:haha
echo play again? y/n
set /p udefine=
if %udefine%==%variable2% (
goto starwars
) else (
goto top
)

copy that and paste it into note pad. save it with .bat at the end. save it to your desktop and then click on it.

this is what the code looks like. me copying the code messed it up. so please just download the .exe verson

[www.dsman1.webs.com/calc.exe download]

sort by: active | newest | oldest
1-10 of 24Next »
It does not work. When I double click on it, it does not execute. Instead Gedit is opened with all the code inside. What am I supposed to do ?
dsman195276 (author)  chooseausername9 years ago
you have to save it as a .bat file not a .txt file.
That's what I've done. The filename is test.bat, and when I double click, it's Gedit that show up ... Any clue ?
You have to downgrade your operating system xD
LMAO!
(*more evil laughters*)
`wine test.bat`

*evil laughter*
Linux, doing everything you do, but better
One thing, you are running under Linux, correct ? The bat file runs under the Window OS, I am not sure about Linux
(*evil laughters*)
BTW: you gave it away by mentioning Gedit LOL
1-10 of 24Next »