将下面这句代码保存为一个VBS文件,然后在要用时,直接就E文的文本文件拖到VBS脚本文件上就工作了。
CreateObject(“SAPI.SpVoice”).Speak CreateObject(“Scripting.FileSystemObject”).OpenTextFile(WScript.Arguments(0)).ReadAll
SzBuf = InputBox( “输入英文单词,用空格分隔:”, “输入”, “I LOVE YOU” )
set tack=CreateObject(“SAPI.SpVoice”)
tack.Speak(SzBuf)