agent doesn' appear with WSH VBScript 
Author Message
 agent doesn' appear with WSH VBScript

When I do the following script someone posted here a bit ago, all I get is
the dialog box...no merlin.  The characters are in the proper directory
under Program Files/Microsoft Agent.  I also get an icon in the tray saying
"No character can be displayed".  Does the script have to exist in there?

--------------------------

Dim AgentControl
On Error Resume Next
Set AgentControl = CreateObject("Agent.Control.1")
If IsObject(AgentControl) Then 'it loaded ok
  AgentControl.Connected = True
  Dim merlin
  On Error Resume Next
  AgentControl.Characters.Load "merlin", "C:\Program Files\Microsoft
Agent\characters\merlin.acs"
  set merlin= AgentControl.Characters ("merlin")
else
  wscript.echo "error"
merlin.Get "state", "Showing"
merlin.Get "state", "Speaking"
merlin.MoveTo 10, 10
merlin.Show
merlin.Get "state", "Moving"
merlin.MoveTo 257, 177
merlin.Speak ("Isn't it about time you started doing some real work?")
merlin.Hide
End If
wscript.echo "What do you think?"

-Ernie



Sat, 10 Feb 2001 03:00:00 GMT  
 agent doesn' appear with WSH VBScript
Hi Ernie,

Try moving the End If right after wscript.echo"error" and you have to leave
the wscript.echo "What do you think?" box on screen to see Merlin do his
things.

Did you have a look at Costa's Agent Scripting Host (ASH for short)? You can
get it at http://users.forthnet.gr/ath/costasan/agent_11.htm.

Regards,
Raymond

Quote:

>When I do the following script someone posted here a bit ago, all I get is
>the dialog box...no merlin.  The characters are in the proper directory
>under Program Files/Microsoft Agent.  I also get an icon in the tray saying
>"No character can be displayed".  Does the script have to exist in there?

>--------------------------

>Dim AgentControl
>On Error Resume Next
>Set AgentControl = CreateObject("Agent.Control.1")
>If IsObject(AgentControl) Then 'it loaded ok
>  AgentControl.Connected = True
>  Dim merlin
>  On Error Resume Next
>  AgentControl.Characters.Load "merlin", "C:\Program Files\Microsoft
>Agent\characters\merlin.acs"
>  set merlin= AgentControl.Characters ("merlin")
>else
>  wscript.echo "error"
>merlin.Get "state", "Showing"
>merlin.Get "state", "Speaking"
>merlin.MoveTo 10, 10
>merlin.Show
>merlin.Get "state", "Moving"
>merlin.MoveTo 257, 177
>merlin.Speak ("Isn't it about time you started doing some real work?")
>merlin.Hide
>End If
>wscript.echo "What do you think?"

>-Ernie



Sat, 10 Feb 2001 03:00:00 GMT  
 agent doesn' appear with WSH VBScript
This works with IE4 installed.
I have not tested it if you only have IE3 installed.
Regards,
Ian Morrish
WSH FAQ http://wsh.glazier.co.nz
Home page http://www.glazier.co.nz
NetMeeting http://ils.glazier.co.nz

Quote:

>Hi Ernie,

>Try moving the End If right after wscript.echo"error" and you have to leave
>the wscript.echo "What do you think?" box on screen to see Merlin do his
>things.

>Did you have a look at Costa's Agent Scripting Host (ASH for short)? You
can
>get it at http://users.forthnet.gr/ath/costasan/agent_11.htm.

>Regards,
>Raymond


>>When I do the following script someone posted here a bit ago, all I get is
>>the dialog box...no merlin.  The characters are in the proper directory
>>under Program Files/Microsoft Agent.  I also get an icon in the tray
saying
>>"No character can be displayed".  Does the script have to exist in there?

>>--------------------------

>>Dim AgentControl
>>On Error Resume Next
>>Set AgentControl = CreateObject("Agent.Control.1")
>>If IsObject(AgentControl) Then 'it loaded ok
>>  AgentControl.Connected = True
>>  Dim merlin
>>  On Error Resume Next
>>  AgentControl.Characters.Load "merlin", "C:\Program Files\Microsoft
>>Agent\characters\merlin.acs"
>>  set merlin= AgentControl.Characters ("merlin")
>>else
>>  wscript.echo "error"
>>merlin.Get "state", "Showing"
>>merlin.Get "state", "Speaking"
>>merlin.MoveTo 10, 10
>>merlin.Show
>>merlin.Get "state", "Moving"
>>merlin.MoveTo 257, 177
>>merlin.Speak ("Isn't it about time you started doing some real work?")
>>merlin.Hide
>>End If
>>wscript.echo "What do you think?"

>>-Ernie



Sun, 11 Feb 2001 03:00:00 GMT  
 agent doesn' appear with WSH VBScript

You can also add the following two lines after the
Merlin.Hide instead of the WScript.Echo line.

Do
Loop While Merlin.Visible

Quote:

>When I do the following script someone posted here a bit
ago, all I get is
>the dialog box...no merlin.  The characters are in the
proper directory
>under Program Files/Microsoft Agent.  I also get an icon in
the tray saying
>"No character can be displayed".  Does the script have to
exist in there?

>--------------------------

>Dim AgentControl
>On Error Resume Next
>Set AgentControl = CreateObject("Agent.Control.1")
>If IsObject(AgentControl) Then 'it loaded ok
>  AgentControl.Connected = True
>  Dim merlin
>  On Error Resume Next
>  AgentControl.Characters.Load "merlin", "C:\Program
Files\Microsoft
>Agent\characters\merlin.acs"
>  set merlin= AgentControl.Characters ("merlin")
>else
>  wscript.echo "error"
>merlin.Get "state", "Showing"
>merlin.Get "state", "Speaking"
>merlin.MoveTo 10, 10
>merlin.Show
>merlin.Get "state", "Moving"
>merlin.MoveTo 257, 177
>merlin.Speak ("Isn't it about time you started doing some
real work?")
>merlin.Hide
>End If
>wscript.echo "What do you think?"

>-Ernie



Sun, 11 Feb 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. why doesn't 2nd text line appear in ps file

2. Why doesn't my posting appear?

3. VBScript and MS Agent character 'instances'

4. Using MS Agent WSH VBScript (Sample)

5. VBScript engine doesn't let VBScript runs???

6. VBScript engine doesn't let VBScript runs???

7. WSH doesn't execute?

8. create object 'agent'

9. Installing wsh on a computer that doesn't have it

10. debugging a WSH-script with microsoft script editor doesn't work

11. Using ASP and WSH to Print on Your Intranet (Why doesn't it work)

12. bug in wsh 5.6 doesn't respect interfaces like 5.5

 

 
Powered by phpBB® Forum Software