Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
Loreuya
- Posts: 3
- Joined: 20 Aug 2015 12:13
#1
Post
by Loreuya » 20 Aug 2015 12:19
Hi I'm new to batch, I want to make a batch file that makes you decide how many times "I love you" is repeated on the screen, so, what I wrote is:
Code: Select all
@echo off
:start
set /p NUMEROSCRITTO=How many time you want me to say I love you? (put a number here)
echo.
set /a NUMERODIVOLTE=%NUMEROSCRITTO%
echo %NUMERODIVOLTE%
pause>nul
CLS
GOTO START
What i get is only a calculator, I mean i put 2 and it says 2, I put 2+2 and it says 4, I don't know any command that allows me to make it say I love you depending on what i put on NUMEROSCRITTO. (Ikr I'm a noob). can you help me?
-
Loreuya
- Posts: 3
- Joined: 20 Aug 2015 12:13
#3
Post
by Loreuya » 20 Aug 2015 16:14
Code: Select all
@echo off
title Generatore di amore! - Lorenzo Marini - Versione 0.1
:start
echo ----------------------------------------------------------------------------
echo Il generatore di amore ti da tutto l'amore di cui hai bisogno, o quasi...
echo ----------------------------------------------------------------------------
echo Source code non offuscato, usare Notepad++ per vederlo.
echo ----------------------------------------------------------------------------
echo.
color 9C
set /p NUMEROSCRITTO=Quante volte vuoi che ti dica ti amo? (Metti un numero)
echo.
For /L %%I in (1,1,%NUMEROSCRITTO%) do echo Ti amo!
echo.
if %NUMEROSCRITTO%==39 echo Che bel numero il 39 ahah!
pause>nul
cls
goto :start
It's For /L %%I in (1,1,%NUMEROSCRITTO%) do echo I love you.
Thank you a lot anyway!