-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMS Agent2.vbs
More file actions
44 lines (37 loc) · 1.37 KB
/
Copy pathMS Agent2.vbs
File metadata and controls
44 lines (37 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
' A script to demonstrate manipulating MS Agent characters. This script
' enumerates the actions a paricular character can perform then terminates.
' For this script to work properly, you'll need to make sure you've got
' a text-to-speech engine installed, along with the Microsoft SAPI 4.0
' runtime support. These requirements can be downloaded at
' www.microsoft.com/msagent/downloads/user.asp
'
' Shawn Stugart
'
' 8/29/2005
strAgentName = InputBox("Enter a character name." & vbCrLf & "For example, " _
& vbCrLf & vbCrLf & "Merlin" & vbCrLf & "Genie" & vbCrLf & "Robby" & vbCrLf & "Peedy")
strSpeech = InputBox("What would you like " & strAgentName & " to say?")
strAgentPath = "c:\windows\msagent\chars\" & strAgentName & ".acs"
Set objAgent = CreateObject("Agent.Control.2")
objAgent.Connected = TRUE
objAgent.Characters.Load strAgentName, strAgentPath
Set objCharacter = objAgent.Characters.Character(strAgentName)
objCharacter.Show
objCharacter.MoveTo 500,400
objCharacter.Speak strSpeech
WScript.Sleep 20000
'For Each strName in objCharacter.AnimationNames
' If strName <> "Show" Then
' If strName <> "Hide" Then
' objCharacter.Speak strName
' Set objRequest = objCharacter.Play(strName)
' i = 1
' Do While objRequest.Status > 0
' i = i + 1
' WScript.Sleep 100
' If i > 50 Then Exit Do
' Loop
' objCharacter.Stop
' End If
' End If
'Next