Make the computer go "ding" then popup a messege

Open Notepad.

Write This Code:
Quote:
Set objVoice = CreateObject("SAPI.SpVoice")
Set objFile = CreateObject("SAPI.SpFileStream.1")

objFile.Open "c:\Windows\Media\Ding.wav"
objVoice.Speakstream objFile
Wscript.Echo "your message here"

where the "c:\windows\Media\Ding.wav" put what sound file you want to be played. I think it only likes .wav i havent tryed out .wma or .mp3 yet. Also where it says "your message here" is the message that gets dispalyed after the sound.

Save as anyname.vbs

0 comments:

Post a Comment