Page 2 of 2 <12
Topic Options
#62455 - 2002-02-05 09:35 AM Re: Using MS Agent in KIX
cj Offline
MM club member
*****

Registered: 2000-04-06
Posts: 1102
Loc: Brisbane, Australia
That is interesting. In my experience VBScript and KiX 4 COM code is almost interchangeable. I have converted some of my fractal code to VBScript for comparison and all I did was drop the $'s on the vars, change the comment symbol to ' and remove the Break on and other unnecessary KiX commands.

as an aside VBScript supports floating numbers and the fractals look so much nicer

So, are you saying that

Do Until request1.Status = Complete

doesn't work when you use it in KiX:

Do Until $request1.Status = Complete

?

cj

Top
#62456 - 2002-02-06 02:06 AM Re: Using MS Agent in KIX
mmantei Offline
Fresh Scripter

Registered: 2002-01-28
Posts: 25
You are correct. It didn't work. Somone in the COM forum however came up with a method that does work. This is the code he came up with..

break on
$merlin_path = "%windir%\msagent\chars\merlin.acs"
$agent = createobject ("agent.control.2")
$agent.connected = "1"
$= $agent.characters.load("merlin","$merlin_path")
$merlin = $agent.characters.character("merlin")
$= $merlin.moveto(400,200)
$= $merlin.show()
$wait = $merlin.play("announce" )
do sleep 1 until $merlin.wait($wait) <> 0
$wait = $merlin.speak("I'm done blowing my own horn" )
do sleep 1 until $merlin.wait($wait) <> 0
?"script done..."
exit 1

it works like a charm.

_________________________
Mike

Top
Page 2 of 2 <12


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1183 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.065 seconds in which 0.038 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org