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