Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

VBscript error with MS Agent Control

Posted on 2004-04-01
2
Medium Priority
?
632 Views
Last Modified: 2008-01-09
Getting an error on line 11 of this program.  I have loaded the Agent software properly.  Thanks for any ideas.
'
' Popup message using Microsoft Agent
'
Set MSAgent = CreateObject("Agent.Control.2")
'
If IsObject(MSAgent) = False Then
   MsgBox "Microsoft Agent is not installed."
   Quit
End If
'
MSAgent.Characters.Load "merlin", "merlin.acs"   ' <--- getting error on this line
Set Merlin = MSAgent.Characters("merlin")
'
With Merlin
    .MoveTo 600,100
    .Show
    .Play("Read")
    .Speak("Your message is ready for you to read.")
End With
'
For z = 1 To 9
    While DateDiff("s", dl, Now) < 1
    Wend
Next
'
Merlin.Hide
'
Set MSAgent = Nothing
Set Merlin = Nothing
'
0
Comment
Question by:mistert006
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 13

Expert Comment

by:crazyman
ID: 10739000
What is the error ?
0
 
LVL 4

Accepted Solution

by:
sokolovsky earned 1500 total points
ID: 10739159
Try this:
<OBJECT ID="AgentControl" width=0 height=0
 CLASSID="CLSID:D45FD31B-5C6E-11D1-9EC1-00C04FD7081F"
 CODEBASE="#VERSION=2,0,0,0">
</OBJECT>

<OBJECT ID="TruVoice" width=0 height=0
 CLASSID="CLSID:B8F2846E-CE36-11D0-AC83-00C04FD97575"
 CODEBASE="#VERSION=6,0,0,0">
</OBJECT>

<SCRIPT language=VBScript>
' In this example the Microsoft Agent control is managed using VBScript.
' Alternatively, JScript could be used.

Dim Robby      ' a global variable to hold the character object
Sub window_OnLoad
      AgentControl.Connected = True      ' necessary for IE3
      AgentControl.Characters.Load "Robby", "http://agent.microsoft.com/agent2/chars/robby/robby.acf"
      Set Robby = AgentControl.Characters("Robby")
      Robby.LanguageID = &H0409            ' needed under some conditions (English)
      Robby.Get "State", "Showing, Speaking"
      Robby.Get "Animation", "Greet, GreetReturn"
      Robby.Show
      Robby.Get "State", "Hiding"
      Robby.Play "Greet"
      Robby.Speak "Hello, World!"
      Robby.Hide
End Sub
</SCRIPT>

Change Robby to Merlin. Works FINE!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question