Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.
Computer Hope forum e-mail issues and down time
0 Members and 1 Guest are viewing this topic.
Dim message, sapiSet sapi=CreateObject("sapi.spvoice")domessage=InputBox("Enter the text you want spoken","Speak This")sapi.Speak messageloop
Dim message, sapiSet sapi=CreateObject("sapi.spvoice")domessage=InputBox("Enter the text you want spoken","Speak This")if message <> "" then sapi.Speak messageloop Until message=""
Code: [Select]Dim message, sapiSet sapi=CreateObject("sapi.spvoice")domessage=InputBox("Enter the text you want spoken","Speak This")if message <> "" then sapi.Speak messageloop Until message=""If you press cancel, Inputbox returns an empty string.
'Blankx=msgbox("Do really wanted to run this program?",4096+64+4,"Confirm.")'BlankDim message, sapiSet sapi=CreateObject("sapi.spvoice")domessage=InputBox("Enter the text you want spoken","Speak This")if message <> "" then sapi.Speak messageloop until message= ""
If msgbox("Do really wanted to run this program?",4096+64+4,"Confirm.") = vbNo Then WScript.QuitEnd IfDim message, sapiSet sapi=CreateObject("sapi.spvoice")domessage=InputBox("Enter the text you want spoken","Speak This")if message <> "" then sapi.Speak messageloop until message= ""
Code: [Select]If msgbox("Do really wanted to run this program?",4096+64+4,"Confirm.") = vbNo Then WScript.QuitEnd IfDim message, sapiSet sapi=CreateObject("sapi.spvoice")domessage=InputBox("Enter the text you want spoken","Speak This")if message <> "" then sapi.Speak messageloop until message= ""For readability, try using using constant names (vbInformation, vbSystemModal) instead of constant values (64, 4096).
DoDim message, sapiSet sapi=CreateObject("sapi.spvoice")If InputBox("Enter the text you want spoken","Speak This") = vbCancel then wscript.quitEnd ifsapi.Speak messageloop
Here is my code:Code: [Select]DoDim message, sapiSet sapi=CreateObject("sapi.spvoice")If InputBox("Enter the text you want spoken","Speak This") = vbCancel then wscript.quitEnd ifsapi.Speak messageloopMy code is wrong and i hope you can help me with it.
If you press cancel, Inputbox returns an empty string.