Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hello all.
Ok i have made a batch that will help me make a batch story. But after i type a few words and press enter it closes and does not store what i type. Any help on how to make it work will be great.
this is what i have so far.
@ECHO OFF
Echo Name of Story?
set story=%~f1
if not exist "%story%" set /p story=
echo %story% >> %story%.txt:Info
cls
echo Info
echo Press a button and then press
echo enter for the effect.
echo ---------------------------
echo echo ---- is 1
echo echo %%name%%: is 2
echo echo %%Girl%%: is 3
echo echo %%Namefriend%%: is 4
echo echo %%Nametown%%: is 5
echo ---------------------------
Echo Press 1 and 2 to get (12)
echo echo ----
echo echo %%name%%:
echo ______________________________
pause
:Type
cls
set %cho%=type
echo echo %type% >> %story%.txt
goto date
:Date
cls
echo Name -
type %story%.txt
Echo Type....
set/p "cho=>"
if %cho%==1 goto a
if %cho%==2 goto b
if %cho%==3 goto c
if %cho%==4 goto d
if %cho%==5 goto e
if %cho%==12 goto f
if %cho%==13 goto g
if %cho%==14 goto h
if %cho%==15 goto i
if NOT %cho%==1 goto type
if NOT %cho%==2 goto type
if NOT %cho%==3 goto type
if NOT %cho%==4 goto type
if NOT %cho%==5 goto type
if NOT %cho%==12 goto type
if NOT %cho%==13 goto type
if NOT %cho%==14 goto type
if NOT %cho%==15 goto type
if %cho%==help goto info
if %cho%==Help goto info
if %cho%==HELP goto info
pause
:A
echo echo ----
echo echo ---- >> %story%.txt
goto date
:B
echo echo %%name%%:
echo echo %%name%%: >> %story%.txt
goto date
:C
echo echo %%Girl%%:
echo echo %%Girl%%: >> %story%.txt
goto date
:D
echo echo %%Namefriend%%:
echo echo %%Namefriend%%: >> %story%.txt
goto date
:E
echo echo %%Nametown%%:
echo echo %%Nametown%%: >> %story%.txt
goto date
:F
echo echo ----
echo echo %%name%%
echo echo ---- >> %story%.txt
echo echo %%name%%: >> %story%.txt
goto date
:G
echo echo ----
echo echo %%Girl%%
echo echo ---- >> %story%.txt
echo echo %%Girl%%: >> %story%.txt
goto date
:H
echo echo ----
echo echo %%Namefriend%%
echo echo ---- >> %story%.txt
echo echo %%Namefriend%%: >> %story%.txt
goto date
:I
echo echo ----
echo echo %%Nametown%%
echo echo ---- >> %story%.txt
echo echo %%Nametown%%: >> %story%.txt
goto date
:Type
cls
set %cho%=type
echo echo %type% >> %story%.txt
goto date

Slight modification: you can probably start with this..... I also removed some cls for debugging.
@echo off :Echo Name of Story? set story=%~f1 if not exist %story%.txt set /p story=Name of story? echo %story% >> %story%.txt :Info :cls echo Info echo Press a button and then press echo enter for the effect. echo --------------------------- echo echo ---- is 1 echo echo %%name%%: is 2 echo echo %%Girl%%: is 3 echo echo %%Namefriend%%: is 4 echo echo %%Nametown%%: is 5 echo --------------------------- Echo Press 1 and 2 to get (12) echo echo ---- echo echo %%name%%: echo ______________________________ pause :Type :cls set %cho%=type echo echo %cho% >> %story%.txt goto date :Date :cls echo Name - type %story%.txt set /p cho=Type.... if "%cho%"=="1" goto a if "%cho%"=="2" goto b if "%cho%"=="3" goto c if "%cho%"=="4" goto d if "%cho%"=="5" goto e if "%cho%"=="12" goto f if "%cho%"=="13" goto g if "%cho%"=="14" goto h if "%cho%"=="15" goto i if NOT "%cho%"=="1" goto type if NOT "%cho%"=="2" goto type if NOT "%cho%"=="3" goto type if NOT "%cho%"=="4" goto type if NOT "%cho%"=="5" goto type if NOT "%cho%"=="12" goto type if NOT "%cho%"=="13" goto type if NOT "%cho%"=="14" goto type if NOT "%cho%"=="15" goto type if "%cho%"=="help" goto info if "%cho%"=="Help" goto info if "%cho%"=="HELP" goto info pause :A echo echo ---- echo echo ---- >> %story%.txt goto date :B echo echo %%name%%: echo echo %%name%%: >> %story%.txt goto date :C echo echo %%Girl%%: echo echo %%Girl%%: >> %story%.txt goto date :D echo echo %%Namefriend%%: echo echo %%Namefriend%%: >> %story%.txt goto date :E echo echo %%Nametown%%: echo echo %%Nametown%%: >> %story%.txt goto date :F echo echo ---- echo echo %%name%% echo echo ---- >> %story%.txt echo echo %%name%%: >> %story%.txt goto date :G echo echo ---- echo echo %%Girl%% echo echo ---- >> %story%.txt echo echo %%Girl%%: >> %story%.txt goto date :H echo echo ---- echo echo %%Namefriend%% echo echo ---- >> %story%.txt echo echo %%Namefriend%%: >> %story%.txt goto date :I echo echo ---- echo echo %%Nametown%% echo echo ---- >> %story%.txt echo echo %%Nametown%%: >> %story%.txt goto date :Type cls set %cho%=type echo echo %type% >> %story%.txt goto date--
Holla.

So all you did was add "" ??
the most simple of things...I did change one or two things to it.
But Thanks...
You ppl are great... :)

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |