I want to be notified for the focus events of the app that the external script
is developed and loaded for. I tried to change the line to be the following,
but didn't see any difference. Where can I get the app process object?
msaaEventSource.Process = weapp.ClientInformation.ApplicationProcess;
On Tuesday, December 1, 2015 7:45 AM, Aaron Smith <[email protected]>
wrote:
By setting the EventSource Process property to your own process, you're
telling Window-Eyes to only notify you about focus events in your own assembly.
Is that what you're attempting to do?
Aaron
--
Aaron Smith
Web Development * App Development * Product Support Specialist
Ai Squared * 725 Airport North Office Park, Fort Wayne, IN 46825
260-489-3671 * www.aisquared.com
To insure that you receive proper support, please include all past
correspondence (where applicable), and any relevant information pertinent to
your situation when submitting a problem report to the Ai Squared Technical
Support Team.
> -----Original Message-----
> From: Scripting [mailto:scripting-
> [email protected]] On Behalf Of
> Yaling Liu via Scripting
> Sent: Monday, November 30, 2015 7:12 PM
> To: [email protected]
> Subject: Cannot handle OnObjectFocus event in external csharp app
>
> I am modifying the first C# example at:
> https://www.gwmicro.com/App_Central/Developers/C-Sharp/, added the
> following code in MyWindowEyes.cs. msaaEventSource and blockEvent are
> member variables of MyWindowEyes.cs. The focus event handler
> MSAAEventSource_OnObjectFocus does not work. It's not called. I know the
> BlockEvent method is executed correctly because when tabbing through
> buttons, Window-Eyes does not read anything.
>
> public bool Init() { ... msaaEventSource = weapp.MSAAEventSource;
> msaaEventSource.Process = ci.ApplicationProcess;
> blockEvent =
> msaaEventSource.BlockEvent(WindowEyes.MSAAEventID.event_OBJECT_F
> OCUS, ci.ApplicationProcess);
> msaaEventSource.OnObjectFocus +=
> MSAAEventSource_OnObjectFocus; ...
> }
> void MSAAEventSource_OnObjectFocus(WindowEyes.Accessible Accessible)
> {
> Program.wineyes.weapp.Speech.Silence();
> Program.wineyes.weapp.Speech.Speak("hello world");}
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.window-eyes.com/private.cgi/scripting-window-
> eyes.com/attachments/20151201/2cf4d8c5/attachment.htm>
> _______________________________________________
> Any views or opinions presented in this email are solely those of the author
> and do not necessarily represent those of Ai Squared.
>
> For membership options, visit http://lists.window-
> eyes.com/options.cgi/scripting-window-
> eyes.com/asmith%40aisquared.com.
> For subscription options, visit http://lists.window-
> eyes.com/listinfo.cgi/scripting-window-eyes.com
> List archives can be found at http://lists.window-
> eyes.com/private.cgi/scripting-window-eyes.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.window-eyes.com/private.cgi/scripting-window-eyes.com/attachments/20151201/18742a5d/attachment.htm>
_______________________________________________
Any views or opinions presented in this email are solely those of the author
and do not necessarily represent those of Ai Squared.
For membership options, visit
http://lists.window-eyes.com/options.cgi/scripting-window-eyes.com/archive%40mail-archive.com.
For subscription options, visit
http://lists.window-eyes.com/listinfo.cgi/scripting-window-eyes.com
List archives can be found at
http://lists.window-eyes.com/private.cgi/scripting-window-eyes.com