Tuesday 24 December 2013

make a talking program

Dim msg, sapi
Dim ch
do
msg=InputBox("Type what you want to listen","Talk it","TYPE IT HERE")
Set sapi=CreateObject("sapi.spvoice")
sapi.Speak msg
ch=InputBox("TYPE y TO CONTINUE USING THIS SOFTWARE TYPE ANYTHING FOLLOWED BY ENTER ELSE TYPE NOTHING JUST ENTER","TALK IT")
Loop Until ch = y

Type the whole bunch of code in notepad or just copy it there,this is what i think you'll prefer...
save it as anything.vbs...
Run the script....
there you go you just made your own talking program...

for more similar programs visit my friend's blog you can also follow me on facebook

Bonus: A tip for you to use while you are use vbs script to program something..
To halt an infinitely running program use the command "taskkill -f -im wscript.exe",
Better to make a batch program with the above command..
To do that open notepad type the command mentioned above i.e., "taskkill -f -im wscript.exe" without quotes and then save it as something.bat then run this program(I fell kinda weird to call it a program.=_=) whenever you fell like your program is running upto infinity...
For more tips on how to create more fun vbs programs keep connected to the blog..
You can also like our facebook page to get the regular updates

No comments:

Post a Comment