Hi Stuart, I copied this excerpt from the information panel of the main Script node in the App Developer's manual and this explains your situation:
Script properties, methods, and events are only available for scripts hosted under Window-Eyes. External, un-hosted scripts will not have access to any of the Script object properties, methods, or events. I would add that the same seems to be true for the Keyboard object. However, the fact that this is true implies that there are alternative means of gathering the information you require. I hope this helps, Rod -----Original Message----- From: Scripting [mailto:scripting-bounces+rod_hutton=hotmail....@lists.window-eyes.com] On Behalf Of Stuart Foster via Scripting Sent: Friday, March 3, 2017 6:13 AM To: scripting@lists.window-eyes.com Subject: Accessing events from external code Hi I've been trying to write code that accesses the Window-eyes com Automation object model from Visual Studio and Powershell. These do not run under the Window-eyes environment. I have been able to instantiate the Windoweyes Object Model, and access the objects' properties and methods. But I cannot access the events. Both PowerShell and the Visual Studio compiler report that the event I am accessing does not exist for the object. Here is what I have done, in both PowerShell and a Visual Studio VB module: Instantiate the Object Model - success Set up a local variable object for the Windoeyes Keyboard - success Demonstrated that I can test the keyboard.KeyDescriberActive state by outputting a variable giving the Boolean value - success Run the application.onquit method to close Window-eyes - success Used the application,speech.speak method to speak out strings - success Attempted to access the keyboard.OnKeyProcessedUp and OnKeyUp events. In both environments, the compiler and interpreter report that the event does not exist for the object. Any ideas? Any help much appreciated. With thanks Regards Stuart Foster -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.window-eyes.com/private.cgi/scripting-window-eyes.com/attachments/20170303/caabf8b0/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/rod_hutton%40hotmail.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 _______________________________________________ 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