I'm trying to make this batch file that runs a lot of things and it only inputs the last vbs line in to the actual vbs file.
:run
cls
color 0a
cd "%userprofile% \desk"
if exist run1.vbs del run1.vbs
copy Nul "run1.vbs"
echo set b=createobject("wscript.shell") >> "run1.vbs"
echo x=inputbox ("type:") > "run1.vbs"
echo strtext = (x) > "run1.vbs"
echo if x=("exe") then > "run1.vbs"
echo y=inputbox("run:") > "run1.vbs"
echo b.run (y) > "run1.vbs"
echo end if > "run1.vbs"
echo if x=("spam") then > "run1.vbs"
echo z=inputbox ("spam:") > "run1.vbs"
echo wscript.sleep 2000 > "run1.vbs"
echo for var = 1 to 50 > "run1.vbs"
echo b.sendkeys z > "run1.vbs"
echo b.sendkeys "{ENTER}" > "run1.vbs"
echo next > "run1.vbs"
echo end if > "run1.vbs"
cd "%userprofile% \desk"
start run1.vbs
ping -n 3 127.0.0.1>nul
exit