Click here to Skip to main content
15,885,537 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Okay im updating this it WAS solved but a problem arose

Its still not putting the variable in + its not putting all 3 lines of code

cd words
@echo off
title SaySpell Editor by Stu. Jayden Serenari
color 3a
:menu
cls
echo   _____                    _____                  _   _ 
echo  / ____!                  / ____!                ! ! ! !
echo ! (___     __ _   _   _  ! (___    _ __     ___  ! ! ! !
echo  \___ \   / _` ! ! ! ! !  \___ \  ! '_ \   / _ \ ! ! ! !
echo  ____) ! ! (_! ! ! !_! !  ____) ! ! !_) ! !  __/ ! ! ! !
echo !_____/   \__,_!  \__, ! !_____/  ! .__/   \___! !_! !_!
echo                    __/ !          ! !                   
echo                   !___/           !_!                   
echo  ______       _   _   _                    _   _        
echo !  ____!     ! ! (_) ! !                  ! ! ! !       
echo ! !__      __! !  _  ! !_    ___    _ __  ! ! ! !       
echo !  __!    / _` ! ! ! ! __!  / _ \  ! '__! ! ! ! !       
echo ! !____  ! (_! ! ! ! ! !_  ! (_) ! ! !    !_! !_!       
echo !______!  \__,_! !_!  \__!  \___/  !_!    (_) (_)   
echo.
echo   1.) Start                     2.)Save old list
set choice=
set /p choice=Number?: 
if %choice%==1 goto start
if %choice%==2 goto save
goto menu

:save
cls
set /p listn=List Number: 
md List%listn%
echo Saving....
move word1.dll List%listn%
move word1.vbs list%listn%
move word2.dll List%listn%
move word2.vbs list%listn%
move word3.dll List%listn%
move word3.vbs list%listn%
move word4.dll List%listn%
move word4.vbs list%listn%
move word5.dll List%listn%
move word5.vbs list%listn%
move word6.dll List%listn%
move word6.vbs list%listn%
move word7.dll List%listn%
move word7.vbs list%listn%
move word8.dll List%listn%
move word8.vbs list%listn%
move word9.dll List%listn%
move word9.vbs list%listn%
move word10.dll List%listn%
move word10.vbs list%listn%
move word11.dll List%listn%
move word11.vbs list%listn%
move word12.dll List%listn%
move word12.vbs list%listn%
move word13.dll List%listn%
move word13.vbs list%listn%
move word14.dll List%listn%
move word14.vbs list%listn%
move word15.dll List%listn%
move word15.vbs list%listn%
move word16.dll List%listn%
move word16.vbs list%listn%
move word17.dll List%listn%
move word17.vbs list%listn%
move word18.dll List%listn%
move word18.vbs list%listn%
move word19.dll List%listn%
move word19.vbs list%listn%
move word20.dll List%listn%
move word20.vbs list%listn%
cls
echo Saved!
echo.
echo Press enter to continue
set /p jjj=
goto menu

:start
cls
echo Welcome! 
echo.
echo This is based on a twenty word list
echo Press enter to continue
set /p asd=

cls
set word=
set /p word=Word 1?: 
echo %word% >> word1.dll
echo speechtext=("%word1%") > word1.vbs
echo set objspeech=createobject("SAPI.spVoice") >> word1.vbs
echo objspeech.speak speechtext >> word1.vbs
cls

cls
set word=
set /p word=Word 2?: 
echo %word% >> word2.dll
echo speechtext=("%word2%") > word2.vbs
echo set objspeech=createobject("SAPI.spVoice") >> word2.vbs
echo objspeech.speak speechtext >> word2.vbs

cls
set word=
set /p word=Word 3?: 
echo %word% >> word3.dll
echo speechtext=("%word3%") > word3.vbs
echo set objspeech=createobject("SAPI.spVoice") >> word3.vbs
echo objspeech.speak speechtext >> word3.vbs

cls
set word=
set /p word=Word 4?: 
echo %word% >> word4.dll
echo speechtext=("%word4%") > word4.vbs
echo set objspeech=createobject("SAPI.spVoice") >> word4.vbs
echo objspeech.speak speechtext >> word4.vbs

cls
set word=
set /p word=Word 5?: 
echo %word% >> word5.dll
echo speechtext=("%word5%") > word5.vbs
echo set objspeech=createobject("SAPI.spVoice") >> word5.vbs
echo objspeech.speak speechtext >> word5.vbs

cls
set word=
set /p word=Word 6?: 
echo %word% >> word1.dll
echo speechtext=("%word6%") > word1.vbs
echo set objspeech=createobject("SAPI.spVoice") >> word6.vbs
echo objspeech.speak speechtext >> word6.vbs

cls
set word=
set /p word=Word 7?: 
echo %word% >> word7.dll
echo speechtext=("%word7%") > word7.vbs
echo set objspeech=createobject("SAPI.spVoice") >> word7.vbs
echo objspeech.speak speechtext >> word7.vbs

cls
set word=
set /p word=Word 8?: 
echo %word% >> word8.dll
echo speechtext=("%word8%") > word8.vbs
echo set objspeech=createobject("SAPI.spVoice") >> word8.vbs
echo objspeech.speak speechtext >> word8.vbs

cls
set word=
set /p word=Word 9?: 
echo %word% >> word9.dll
echo speechtext=("%word9%") > word9.vbs
echo set objspeech=createobject("SAPI.spVoice") >> word9.vbs
echo objspeech.speak speechtext >> word9.vbs

cls
set word=
set /p word=Word 10?: 
echo %word% >> word10.dll
echo speechtext=("%word10%") > word10.vbs
echo set objspeech=createobject("SAPI.spVoice") >> word10.vbs
echo objspeech.speak speechtext >> word10.vbs

cls
set word=
set /p word=Word 11?: 
echo %word% >> word11.dll
echo speechtext=("%word11%") > word11.vbs
echo set objspeech=createobject("SAPI.spVoice") >> word11.vbs
echo objspeech.speak speechtext >> word11.vbs

cls
set word=
set /p word=Word 12?: 
echo %word% >> word12.dll
echo speechtext=("%word12%") > word12.vbs
echo set objspeech=createobject("SAPI.spVoice") >> word12.vbs
echo objspeech.speak speechtext >> word12.vbs

cls
set word=
set /p word=Word 13?: 
echo %word% >> word13.dll
echo speechtext=("%word13%") > word13.vbs
echo set objspeech=createobject("SAPI.spVoice") >> word13.vbs
echo objspeech.speak speechtext >> word13.vbs

cls
set word=
set /p word=Word 14?: 
echo %word% >> word14.dll
echo speechtext=("%word14%") > word14.vbs
echo set objspeech=createobject("SAPI.spVoice") >> word14.vbs
echo objspeech.speak speechtext >> word14.vbs

cls
set word=
set /p word=Word 15?: 
echo %word% >> word15.dll
echo speechtext=("%word15%") > word15.vbs
echo set objspeech=createobject("SAPI.spVoice") >> word15.vbs
echo objspeech.speak speechtext >> word15.vbs

cls
set word=
set /p word=Word 16?: 
echo %word% >> word16.dll
echo speechtext=("%word16%") > word16.vbs
echo set objspeech=createobject("SAPI.spVoice") >> word16.vbs
echo objspeech.speak speechtext >> word16.vbs

cls
set word=
set /p word=Word 17?: 
echo %word% >> word17.dll
echo speechtext=("%word17%") > word17.vbs
echo set objspeech=createobject("SAPI.spVoice") >> word17.vbs
echo objspeech.speak speechtext >> word17.vbs

cls
set word=
set /p word=Word 18?: 
echo %word% >> word1.dll
echo speechtext=("%word18%") > word18.vbs
echo set objspeech=createobject("SAPI.spVoice") >> word18.vbs
echo objspeech.speak speechtext >> word18.vbs

cls
set word=
set /p word=Word 19?: 
echo %word% >> word1.dll
echo speechtext=("%word19%") > word19.vbs
echo set objspeech=createobject("SAPI.spVoice") >> word19.vbs
echo objspeech.speak speechtext >> word19.vbs

cls
set word=
set /p word=Word 20?: 
echo %word% >> word20.dll
echo speechtext=("%word20%") > word20.vbs
echo set objspeech=createobject("SAPI.spVoice") >> word20.vbs
echo objspeech.speak speechtext >> word20.vbs
cls
echo The list is now done!
echo.
echo Press enter to exit.
set /p mas=
Posted
Updated 31-Jan-13 13:48pm
v3
Comments
Abhishek Pant 31-Jan-13 20:46pm    
i'm confused your updated part is answer or question?

Here is my advice: switch to PowerShell:
http://en.wikipedia.org/wiki/PowerShell[^],
http://technet.microsoft.com/en-US/scriptcenter/dd742419.aspx[^].

Not only it has impressive purely scripting syntax, but it provides easy access to all of WMI and the power of .NET. There is absolutely no need to use VBScript or JavaScript with Windows Script Host, but it is also accessible.

Moreover, its recent version 3.0 finally provides really decent stepwise debugger and even very good Intellisense.

—SA
 
Share this answer
 
v2
I put the first few lines of your BAT file into a BAT file and executed it. The quotes do appear in the filename.vbs file. I have Windows 8.

My BAT file looks like this:
SET /p var=What To Say:
echo speechtext=("%var%") > filename.vbs
echo set objspeech=createobject("SAPI.spvoice") >> filename.vbs
echo objspeech.speak speechtext >> filename.vbs


The filename.vbs looks like this:
speechtext=("Hello World") 
set objspeech=createobject("SAPI.spvoice") 
objspeech.speak speechtext 

and when I execute it, I hear the "Hello World"
 
Share this answer
 
v2
Comments
G4mm4R4y 31-Jan-13 19:36pm    
See it may have to do with the windows version because mine wold simply say

speechtext=("")
set objspeech=createdobject("SAPI.voice")
objspeech.speak speechtext
G4mm4R4y 31-Jan-13 19:38pm    
Wait i tried yours and it worked!

Thank the heavens!

Mike Meinz 31-Jan-13 19:45pm    
Please accept the solution to mark the question as answered.
G4mm4R4y 31-Jan-13 19:48pm    
I rejected because a new problem was found please if you can remake the code or tell me the error
Mike Meinz 31-Jan-13 19:59pm    
You use SET /P to set a parameter named word but you put word1 in the echo speechtext= statement. Same issue for all 20 of them.

Please mark the question as answered.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900