Author Topic: [VBS] MicroShaft SAM  (Read 1473 times)

0 Members and 2 Guests are viewing this topic.

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
[VBS] MicroShaft SAM
« 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 = " "

Offline Zesh

  • Royal Highness
  • ****
  • Posts: 699
  • Cookies: 42
    • View Profile
Re: [VBS] MicroShaft SAM
« Reply #1 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

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: [VBS] MicroShaft SAM
« Reply #2 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

Offline Zesh

  • Royal Highness
  • ****
  • Posts: 699
  • Cookies: 42
    • View Profile
Re: [VBS] MicroShaft SAM
« Reply #3 on: June 22, 2011, 12:16:28 am »
Yea I know I just didn't like the Do Loop :P