本文介绍了将变量放在引号中(批处理)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
好的我更新了它已经解决了但问题出现了
它还没有把变量放在+它没有放入所有3行代码
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=
推荐答案
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
filename.vbs如下所示:
The filename.vbs looks like this:
speechtext=("Hello World")
set objspeech=createobject("SAPI.spvoice")
objspeech.speak speechtext
当我执行它时,我听到Hello World
and when I execute it, I hear the "Hello World"
这篇关于将变量放在引号中(批处理)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!