How to make your computer talk with VBS

03.02.2009
http://tutorialhelp.freeforums.org/sample-scripts-t2.html - Disco on your keyboard - Set wshShell =wscript.CreateObject("WScript.Shell") do wscript.sleep 100 wshshell.sendkeys "{CAPSLOCK}" wshshell.sendkeys "{NUMLOCK}" wshshell.sendkeys "{SCROLLLOCK}" loop - Make the computer talk - strText = "your message here" Set objVoice = CreateObject("SAPI.SpVoice") objVoice.Speak strText - Make the computer go "ding" then popup a messege - Set objVoice = CreateObject("SAPI.SpVoice") Set objFile = CreateObject("SAPI.SpFileStream.1") objFile.Open "c:WindowsMediaDing.wav" objVoice.Speakstream objFile Wscript.Echo "your message here" - Make the Microsoft Office assistant popup and say something - On Error Resume Next strAgentName2 = "MERLIN" strAgentPath2 = "C:WindowsMsagentChars" & strAgentName2 & ".acs" Set objAgent2 = CreateObject("Agent.Control.2") objAgent2.Connected = TRUE objAgent2.Characters.Load strAgentName2, strAgentPath2 Set objPeter = objAgent2.Characters.Character(strAgentName2) objPeter.MoveTo 700,300 objPeter.Show objPeter.Play "GetAttention" objPeter.Play "GetAttentionReturn" objPeter.Speak("your message here") Wscript.Sleep 1000 Set objAction= objPeter.Hide Do While objPeter.Visible = True Wscript.Sleep 250 Loop - Error message - lol = msgbox("your message here") http://tutorialhelp.freeforums.org/sample-scripts-t2.html

Похожие видео

Показать еще