Sink events from an agent?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Sink events from an agent?

Bill Schwab-2
Andy,

Thanks to the Avatar Chat sample, I have a talking parrot on my screen, and
he seems to have a fairly good grasp of medical technology :)  So far, he's
able to offer context sensitive advice, but, is otherwise not terribly
interactive.  Users will expect to prod him with the pointer and get some
kind of response.  I know that's possible, because the MS web site has pages
that handle such events.

For sinking these events in Dolphin, is AXControlSite>>connectSink a good
starting point?  If I'm following it, it uses a type library to learn where
to connect and probably to make sense of the events????  Are there other
features of the control site that would be required to make this work?

I think the following comment has a copy/paste error:

AXEventSink>>triggerIndividualEvents
 "Answer whether the receiver will trigger the generic
#axEvent:withArguments: event off
 its target on receipt of events from the COM event source. By default this
is on."

Have a good one,

Bill

--
Wilhelm K. Schwab, Ph.D.
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Sink events from an agent?

Blair McGlashan
Bill

You wrote in message news:95mno3$hnebb$[hidden email]...
>
> Thanks to the Avatar Chat sample, I have a talking parrot on my screen,
and
> he seems to have a fairly good grasp of medical technology :)  So far,
he's
> able to offer context sensitive advice, but, is otherwise not terribly
> interactive.  Users will expect to prod him with the pointer and get some
> kind of response.  I know that's possible, because the MS web site has
pages
> that handle such events.
>...

It is in fact very easy to do using AXEventSink (essentially just two
statements, one to instantiate the sink, one to connect it):

    ctl := IAgentCtlEx new.

    "Wire up to the events from the control"
    sink := AXEventSink target: self  sourceTypeInfo: _AgentEvents typeInfo.
    sink connect: ctl.

    "Enable tracing so we can see the events being fired on the Transcript"
    sink isTracingEnabled: true.

    "Do something to cause some events to be fired"
    ctl connected: true.
    ctl characters load: 'Merlin' loadKey:
'c:\winnt\msagent\chars\merlin.acs'.
    merlin := ctl characters character: 'Merlin'.
    merlin activate: 1; show: false; soundEffectsOn: true.
    merlin speak: merlin description url: nil.

>...
> I think the following comment has a copy/paste error:
>
> AXEventSink>>triggerIndividualEvents
>  "Answer whether the receiver will trigger the generic
> #axEvent:withArguments: event off
>  its target on receipt of events from the COM event source. By default
this
> is on."
>

Ta.

Regards

Blair


Reply | Threaded
Open this post in threaded view
|

Re: Sink events from an agent?

Bill Schwab-2
Hi Blair,

> It is in fact very easy to do using AXEventSink (essentially just two
> statements, one to instantiate the sink, one to connect it):

Peedy sends his best, though he does hold you partially responsible for an
increased number of pokes in his abdomen :)

Have a good one,

Bill

--
Wilhelm K. Schwab, Ph.D.
[hidden email]