Page 2 of 3 <123>
Topic Options
#50669 - 2000-08-08 04:11 PM Re: Bored? Add Pizazz with OLE/MSAgent 2.0
Anonymous
Unregistered


I KNEW my intelligence was the problem in getting them to move... *grin*
(that and the fact that I'm not familiar with OLE.)

Thanx Shawn - you da' man, as usual.

Any way I could persuade you into explaining some of the OLE secrets to me? Like: what do the "s" and the "ss" stand for - and how do yuo know when to use what? Or maybe you have an OLE-for-extreme-beginners document? *grin*

Top
#50670 - 2000-08-08 04:24 PM Re: Bored? Add Pizazz with OLE/MSAgent 2.0
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
OK... lets sum this up.

This has very little REAL function, in fact it slows up processing of scripts and it wastes our time in research and in development, and will most likely NOT be used in a production environment.

But it is kind of cool

So let me show you what I have setup now:

code:

$=setconsole("minimize")
$videokey="HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Services\"
$VidCard= enumkey("$videokey",$index)
if @error=0
$video=$videokey+$VidCard+"\Device0"
$xres=readvalue("$video","DefaultSettings.XResolution")
$yres=readvalue("$video","DefaultSettings.YResolution")
else
$xres=640
$yres=480
endif
$xlimit=val($xres)-120
$ylimit=val($yres)-150
? $xlimit $ylimit
$agent_control = "agent.control.2"
$agent_name = "Merlin"
$agent_path = "%windir%\msagent\chars\$agent_name.acs"
$agent_mode = "speak"
$agent = olecreateobject ( "$agent_control" )
$= oleputproperty ( $agent, "connected", "s","1" )
$characters = val ( "&" + olegetproperty ( $agent, "characters" ) )
$= olecallfunc ( $characters, "load", "ss","$agent_name","$agent_path" )
$character = val ( "&" + olecallfunc ( $characters, "character", "s", "$agent_name" ) )
$= olecallfunc ( $character, "show" )
$= olecallfunc ( $character, "play", "s", "announce" )
$= olecallfunc ( $character, "play", "s", "greet" )
$= olecallfunc ( $character, "$agent_mode", "s", "Greetings %username% !" )
sleep 10
$= olecallfunc ( $character, "play", "s", "restpose" )
$= olecallfunc ( $character, "$agent_mode", "s", "My name is $agent_name and "+"this is your logon script ... " )
sleep 5
$= olecallfunc ( $character, "play", "s", "read" )
$= olecallfunc ( $character, "$agent_mode", "s", "Checking group membership ..." )
$= olecallfunc ( $character, "play", "s", "readreturn" )
sleep 10
$= olecallfunc ( $character, "moveto", "ss", "$xlimit", "0" )
$= olecallfunc ( $character, "play", "s", "domagic1" )
$= olecallfunc ( $character, "$agent_mode", "s", "I summon your network drives" )
$= olecallfunc ( $character, "$agent_mode", "s", "Appear!!" )
$= olecallfunc ( $character, "play", "s", "domagic2" )
sleep 15
$= olecallfunc ( $character, "moveto", "ss", "$xlimit", "$ylimit" )
$= olecallfunc ( $character, "$agent_mode", "s", "Examining your computer" )
$= olecallfunc ( $character, "play", "s", "search" )
sleep 10
$= olecallfunc ( $character, "moveto", "ss", "0", "$ylimit" )
$= olecallfunc ( $character, "play", "s", "wave" )
$= olecallfunc ( $character, "$agent_mode", "s", "All done... have a nice day !" )
$= olecallfunc ( $character, "hide" )
sleep 10
$= olecallfunc ( $character, "moveto", "ss", "$xlimit", "0" )
$= olecallfunc ( $character, "show" )
$= olecallfunc ( $character, "$agent_mode", "s", "But I'll be watching you..." )
sleep 5
$= olecallfunc ( $character, "hide" )
$= olereleaseobject ( $agent )
sleep 5
exit

I even found a santa claus character and a jack o' lantern character that could be useful at a later date...

_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#50671 - 2000-08-08 05:38 PM Re: Bored? Add Pizazz with OLE/MSAgent 2.0
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Gang:

Here's a script that utilizes some of the synchro methods (wait) features of MSAgent. Gives one a bit more control with multi-character interaction:

code:

break on


$agent_control = "agent.control.2"


$name1 = "Merlin"
$path1 = "%windir%\msagent\chars\$name1.acs"


$name2 = "Peedy"
$path2 = "%windir%\msagent\chars\$name2.acs"


$agent = olecreateobject ( "$agent_control" )


$= oleputproperty ( $agent, "connected", "s", "1" )


$characters = val ( "&" + olegetproperty ( $agent, "characters" ) )


$= olecallfunc ( $characters, "load", "ss", "$name1", "$path1" )


$= olecallfunc ( $characters, "load", "ss", "$name2", "$path2" )


$actor1 = val ( "&" + olecallfunc ( $characters, "character", "s", "$name1" ) )


$actor2 = val ( "&" + olecallfunc ( $characters, "character", "s", "$name2" ) )


$= olecallfunc ( $actor2, "moveto", "ss", "200", "50" )


$rs = olecallfunc ( $actor1, "show" )


$rs = olecallfunc ( $actor2, "show" )


;$rs = olecallfunc ( $actor1, "wait", "o", "$wait" )


$wait = olecallfunc ( $actor1, "think", "s", "Hey $name2, wanna see me pull a KiX OLE "+
"function out of my hat ???" )


$= olecallfunc ( $actor2, "wait", "o", "$wait" )


$wait = olecallfunc ( $actor2, "think", "s", "Oh $name1, that trick never works !!!" )


$= olecallfunc ( $actor1, "wait", "o", "$wait" )


$= olecallfunc ( $actor1, "think", "s", "Let me roll up my sleaves ..." )


$= olecallfunc ( $actor1, "play", "s", "domagic1" )


$= olecallfunc ( $actor1, "think", "s", "Presto !!!" )


$= olecallfunc ( $actor1, "play", "s", "domagic2" )


$= olecallfunc ( $actor1, "play", "s", "confused" )


$wait = olecallfunc ( $actor1, "think", "s", "Looks like I need a new hat" )


$= olecallfunc ( $actor2, "wait", "o", "$wait" )


$= olecallfunc ( $actor2, "play", "s", "sad" )


$= olecallfunc ( $actor2, "think", "s", "Jeez !!! maybe you need KiXtart 2000" )


?"pause..." gets $c


$= olereleaseobject ( $actor1 )
$= olereleaseobject ( $actor2 )
$= olereleaseobject ( $agent )

exit


Shawn.



Top
#50672 - 2000-08-08 10:02 PM Re: Bored? Add Pizazz with OLE/MSAgent 2.0
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Rad:

I just demo'd your last script (post) to some of my developer friends over here.

Never saw so many long jaws and thoughtful grins in quite a while.

I really like how you "mapped-out" the desktop space !

I'm thinking real hard about a practical application for this sh*t, but damned if I can come up with anything. I don't know, maybe something to to with computer-based training or wheel-chair accessibility or something (not that there's anything wrong with that, etc, etc...) !


Shawn.

Top
#50673 - 2000-08-08 11:02 PM Re: Bored? Add Pizazz with OLE/MSAgent 2.0
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
I know exactly what you mean.

The best I can come up with is:
message of the day (birthday's, announcements, crap)
virus alert messages (don't open messages entitled "Iloveyou", etc )

It's cute, but not really usefull. I hate to see it go to waste, but...

_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#50674 - 2000-08-10 01:04 AM Re: Bored? Add Pizazz with OLE/MSAgent 2.0
Anonymous
Unregistered


Is there a way to see, if the Agent is done with the animation or speak ???
Top
#50675 - 2000-08-10 02:07 AM Re: Bored? Add Pizazz with OLE/MSAgent 2.0
Anonymous
Unregistered


The animation is great, but I agree, how can we use it in production?? Perhaps some Rudolph and Santa stuff at Xmas to entertain the minions, but otherwise???? It's great fun though!
Top
#50676 - 2000-08-11 10:36 PM Re: Bored? Add Pizazz with OLE/MSAgent 2.0
Anonymous
Unregistered


the idea is graet,
my problem is....
the script runs on my NT server (no problem there)
but using it for a login script don't work.
the users (windows-98 PC's) just geting a blank login screen.
i installed the rpc service on my server
still don't work.
im missing somthing here
Please help!!


Top
#50677 - 2000-08-11 10:45 PM Re: Bored? Add Pizazz with OLE/MSAgent 2.0
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Jango:

I don't use Win9X so I probably can't be of much assistance here.

Do your Win9x machines have sound cards ?

I know that if your try to use the "speak" method, yet don't have a sound card, the agent server might stall !

If you are using "speak", try "think" instead.


Shawn.

Top
#50678 - 2000-08-11 11:35 PM Re: Bored? Add Pizazz with OLE/MSAgent 2.0
Anonymous
Unregistered


shawn
all my work station have a sound card.
i tried it first on my laptop, (running win2k),it work great localy on my laptop

via the server with the login script....nop
i do use kix on my server for mapping drives (no problem).
i use a login.bat to call the kix script
%\..\kix32 login.kix (that's my login.bat)

i did the same for the msagent
%\..\kix32 msagent.kix
all my script files are in the
Import\script folder

still nothing.....
i know im missing something.


p.s. thanx for the quick reply


Top
#50679 - 2000-08-12 04:45 AM Re: Bored? Add Pizazz with OLE/MSAgent 2.0
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
You have all the required files installed?? Agent 2
merlin
voice synthesis

BTW, all those files are built into win2k, but not in 95 or 98

_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#50680 - 2000-08-12 07:19 AM Re: Bored? Add Pizazz with OLE/MSAgent 2.0
Anonymous
Unregistered


well,
i have evrything installed on the server
Agent 2,Genie,voice synthesis.
the script is running fine on the NT server.
when im logging (from a work station) a DOS windows open...diplaying the batch file,
that's it.
my laptop is on the network running win2k
same results.
i did the script on the laptop, it's working fine localy.
figure i need to install the RPC service on the server, did that.....still nothing!!!
i'm going crazy here......what em i doing worng!!
could it be the way i installed KIX??
maybe somthing with the RPC service??
Damn.....i'm lost here.

Radimus, win2k comes only with Agent 2 built into.
you think i need to install anything on the workstations? but my Laptop runing win2k
doing the same thing!!

the only thing i can say is
PLEASE HELP

Jango

Top
#50681 - 2000-08-12 10:10 AM Re: Bored? Add Pizazz with OLE/MSAgent 2.0
Anonymous
Unregistered


I have the same behaviour here. the script does not works on win9x machines but I do not think that is a great problem .
Top
#50682 - 2000-08-12 05:34 PM Re: Bored? Add Pizazz with OLE/MSAgent 2.0
Anonymous
Unregistered


it's not a graet problem....

i just like to solve it,
chalenge my frined thats all it is.

Jango

Top
#50683 - 2000-08-14 02:50 PM Re: Bored? Add Pizazz with OLE/MSAgent 2.0
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Jango:

Unfortunately, all the pieces of MSAgent have to be installed on the target workstation for this stuff to work !

With Automation, it's not just as simple as running an executable off a server. Objects have to be registered, registry pointers initialized and such. To my knowledge, there is no COM equivalent to "running a remote executable on the workstation".

There is something called "Distributed COM (DCOM)", but even if you did configure MSAgent like this, the object would still actually "run" on the server, not on the workstation. And assuming that MSAgent would require intimate knowledge of your workstation desktop and other (TTS) drivers, I doubt that it would work.


Shawn.


Top
#50684 - 2000-08-14 05:23 PM Re: Bored? Add Pizazz with OLE/MSAgent 2.0
Anonymous
Unregistered


shawn
if i understand you correctly
i need to install MSagent&charecter and the TTS engine on the ws, in order for the script to run from the server to the ws,
then i need to change the path in the script
to run the agent localy.
Hmm...
i'll try it
i'll let you know

Jango

Top
#50685 - 2000-08-15 07:34 PM Re: Bored? Add Pizazz with OLE/MSAgent 2.0
Anonymous
Unregistered


well, finnely i gut it to work
workstation.

i still have problem with win-98
(won't work)i'll see what i can do
or maybe any one have an idea?

thanx shawn

Jango.

Top
#50686 - 2000-08-15 07:49 PM Re: Bored? Add Pizazz with OLE/MSAgent 2.0
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Jango:

What gets displayed when you run this:

code:

break on


$agent_control = "agent.control.2"


$agent = olecreateobject ( "$agent_control" )


?"agent = $agent"
?"error = @error"
?"message = @serror"

?

$= olereleaseobject ( $agent )


exit



on your Win98 machine ?


Shawn.

Top
#50687 - 2000-08-16 12:16 AM Re: Bored? Add Pizazz with OLE/MSAgent 2.0
Anonymous
Unregistered


shawn
when running this script
i get this:

agent = 24054584
erorr = 0
message = The operation completed successfully

[This message has been edited by Jango (edited 16 August 2000).]

Top
#50688 - 2000-08-16 02:03 PM Re: Bored? Add Pizazz with OLE/MSAgent 2.0
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Jango:

1) Does the variable $agent_path point to the proper directory where the merlin.acs character file resides.

2) Place this:

?"Error @error : @serror"

after the next function call in your script.

Run your script again and if it's Error 0, move it to after your next function call.

Keep doing this until you get an error code displayed. This will be your trouble spot !

Shawn.


Top
Page 2 of 3 <123>


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

Who's Online
0 registered and 484 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.066 seconds in which 0.023 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