There's some sample C++ code on Script Central, along with the SDK you'll need (which includes the IDL and interface definitions and such you might need depending on your development environment.)
You might also have access to a framework like ATL that makes working with COM somewhat simpler than what we've done in those examples.
To do what you want to do, assuming you really do want to access functionality in a script you've written and not just the functionality built in to Window-Eyes, you'd probably create a shared object in your script, get a reference to that shared object from your C++ application, then call its functionality. If you just want to do built-in things from a C++ application, that's even easier. No shared objects involved, just get a WindowEyes.Application object and ask it to do things for you just as you would a Word.Application object or any other COM Automation server.
On 5/28/2010 7:49 AM, Tim Burgess wrote:
My app's using c++ under win32, so COM isn't a huge issue - don't suppose anybody has any sample code? Best wishes. Tim Burgess Raised Bar Ltd Phone: +44 (0)1827 719822 Mobile: 07989 486976 Web: http://www.raisedbar.net Facebook: http://www.facebook.com/pages/Atherstone-United-Kingdom/Raised-Bar-Ltd/12023 4896800 Don't forget to vote for improved access to music and music technology at http://www.raisedbar.net/petition.htm -----Original Message----- From: Chip Orange [mailto:[email protected]] Sent: 28 May 2010 12:07 To: [email protected] Subject: RE: Calling a WE script from another application Tim, it's easy enough to do if you have access to COM in this other application; do you? otherwise, I believe you should have access to sendkeys, and you could send a hotkey (either a global one or one directed at a particular window), and have a script or window eyes act on the hotkey. hth, Chip ________________________________ From: Tim Burgess [mailto:[email protected]] Sent: Friday, May 28, 2010 5:40 AM To: [email protected] Subject: Calling a WE script from another application Hi, Is it at all possible to run a function (e.g. reading the current line) by calling it from another application using an API call? I'm trying to extend the functionality I can achieve from a self-voicing application I'm working on that takes input from a specialized piece of hardware. Best wishes. Tim Burgess Raised Bar Ltd Phone: +44 (0)1827 719822 Mobile: 07989 486976 Web: http://www.raisedbar.net Facebook: http://www.facebook.com/pages/Atherstone-United-Kingdom/Raised-Bar-Ltd/12023 4896800 Don't forget to vote for improved access to music and music technology at http://www.raisedbar.net/petition.htm
