Gimme an help with this simple thing please :P

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Loreuya
Posts: 3
Joined: 20 Aug 2015 12:13

Gimme an help with this simple thing please :P

#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?

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

Re: Gimme an help with this simple thing please :P

#2 Post by Squashman » 20 Aug 2015 13:07

Code: Select all

For /L %%I in (1,1,%NUMERODIVOLTE%) do echo I Love You

Loreuya
Posts: 3
Joined: 20 Aug 2015 12:13

Re: Gimme an help with this simple thing please :P

#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!

Post Reply