okay, so im a noob at this, i just know the basics, i wanted to practice setting variables and since i like DotA i was creating a hero by setting the variables. i dont know the code tags in FP so im gonna paste the code as it is
@echo off
set /p name= name of hero
if %name%== %name% goto :E1
:E1
set /p raze= raze of hero
if %raze%== %raze% goto :E2
:E2
set /p prop= proper name of hero
if %prop%== %prop% goto :E3
:E3
set /p prim= what will the primary atribute be?
if %prim%== %prim% goto :E4
:E4
set /p intS= initial strength
if %intS%== %instS% goto :E5
:E5
set /p intI= initial intelligence
if %intI%== %intI% goto :E6
:E6
set /p intA= initial agility
if %intA%== %intA% goto :E7
and so on for every detail, at the end i will do this
echo Name %name%
echo Raze %raze%
echo Proper Name %prop%
and so on
[B]what i want to do is copy every input into a notepad and save it into your computer. please tell me how to do it( i believe it is possible)[/B]
BUMP? no one uses batchfiles anymore...
Use code tags like this:
[noparse][code]Code here[/code][/noparse]
To append a varialbe in batch to a text file you use
[code]echo %variable%>>textfile.txt[/code]
You can write to a file without keeping what is already in it
[code]echo %variable%>textfile.txt[/code]
So your code would be:
[code]
echo Name %name%>>textfile.txt
echo Raze %raze%>>textfile.txt
echo Proper Name %prop%>>textfile.txt
[/code]
Reading a file is more messy from what I know, can't remember exactly how to read but I remember that I used a for loop.
thanx a lot
Sorry, you need to Log In to post a reply to this thread.