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_FOCUS, 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/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