我需要知道该vbscript可以使用哪个命令
我正在用vbscript在记事本中制作一个“测试程序”。我的第一个命令是“键入名称”,我想说欢迎,然后是他们键入的名称。有什么建议吗 代码如下:我需要知道该vbscript可以使用哪个命令,vbscript,notepad,Vbscript,Notepad,我正在用vbscript在记事本中制作一个“测试程序”。我的第一个命令是“键入名称”,我想说欢迎,然后是他们键入的名称。有什么建议吗 代码如下: Dim speaks, speech speaks="Welcome" Set speech=CreateObject("sapi.spvoice") speech.Speak speaks Dim msg, sapi msg=InputBox("Type your name in the box be
Dim speaks, speech
speaks="Welcome"
Set speech=CreateObject("sapi.spvoice")
speech.Speak speaks
Dim msg, sapi
msg=InputBox("Type your name in the box below and press ENTER to proceed","Notepad","YOUR NAME HERE")
Set sapi=CreateObject("sapi.spvoice")
sapi.Speak msg
speaks="This is my test program"
Set speech=CreateObject("sapi.spvoice")
speech.Speak speaks
您不需要继续创建
sapi.spvoice
的实例。只需创建一次并重用它。您还可以将所有字符串组合成一个字符串,这听起来就像您正在尝试做的
Set speech = CreateObject("sapi.spvoice")
msg = InputBox("Type your name in the box below and press ENTER to proceed", "Notepad", "YOUR NAME HERE")
speech.Speak "Welcome " & msg & ". This is my program."