当我使用它时,它只会在我教另一个词时说话,我不能在目录中说出具体的答案,你们对如何解决这个问题有任何意见,我很难过......
@ECHO OFF
@mode con cols=55 lines=10
if not exist data.txt echo.>data.txt
:begin
set /p text="Talk: "
for /f "tokens=1,* delims=@" %%i in (data.txt) do (
if /i "%text%"=="%%i" (
echo Visu: %%j
goto begin
)
)
:Learn
echo --- I don't know that.
set /p answer=--- What would be a good answer to '%text%'?
echo %text%@%answer%>>data.txt
echo Visu: thank you
goto Aye
:Aye
echo set speech = Wscript.CreateObject("SAPI.spVoice") >> "temp.vbs"
echo speech.speak "%answer%" >> "temp.vbs"
start temp.vbs
pause
del temp.vbs
goto begin
答案 0 :(得分:0)
将start temp.vbs
替换为cscript /nologo temp.vbs
。
也许你想要
echo set speech = Wscript.CreateObject("SAPI.spVoice") > "temp.vbs"
(>
而不是>>
)每次都要覆盖文件?
答案 1 :(得分:0)
<CheckBox IsChecked="{Binding Features[FEATURE1].Selected, Mode=TwoWay}" />