EvilZone

Programming and Scripting => Scripting Languages => Topic started by: Kulverstukas on June 21, 2011, 09:44:33 PM

Title: [VBS] MicroShaft SAM
Post by: Kulverstukas on June 21, 2011, 09:44:33 PM
I was cleaning my desktop just now and noticed this script. Where did I get it - this I can't remember :D
This script works with MS Sam, you input some text and Sam says it :P
To close is just enter a space and press enter.

Code: [Select]
Dim msg, sapi
Do
msg=InputBox("Enter your text and press 'ENTER' to make MicroShafts SaM talk","MicroShaft Sam")
Set sapi=CreateObject("sapi.spvoice")
sapi.Speak msg
loop until msg = " "
Title: Re: [VBS] MicroShaft SAM
Post by: Zesh on June 21, 2011, 11:58:05 PM
Do Loop? Pretty poor..I have this:

Code: [Select]
Dim userInput

userInput = InputBox("Type below anything to hear you PC speak it!")

Set Sapi = Wscript.CreateObject("SAPI.SpVoice")

Sapi.speak userInput

lol :P
Title: Re: [VBS] MicroShaft SAM
Post by: Kulverstukas on June 22, 2011, 12:03:58 AM
Do Loop? Pretty poor..I have this:

Code: [Select]
Dim userInput

userInput = InputBox("Type below anything to hear you PC speak it!")

Set Sapi = Wscript.CreateObject("SAPI.SpVoice")

Sapi.speak userInput

lol :P
lol hey I didn't write this :D
Title: Re: [VBS] MicroShaft SAM
Post by: Zesh on June 22, 2011, 12:16:28 AM
Yea I know I just didn't like the Do Loop :P