--- In [email protected], "entropyreduction" <alancampbelllists+ya...@...> wrote: > > > > --- In [email protected], "Sheri" <sherip99@> wrote: > > > I researched as best I could. > > Thanks. > > > About 2/3rds into this article: > > <http://msdn.microsoft.com/en-us/library/cc301312.aspx>
....(snip)... It also says: ... there are two common situations where Active Accessibility cannot be fully exploited. First, some applications have custom, owner drawn, or windowless controls that do not natively support the IAccessible interface. Second, some programs support only the "read information" methods of IAccessible. In the first situation, all you can do is emulate keyboard and mouse input as described earlier. In well-written software you can generally use accelerators, or navigate to controls using hotkeys and the Tab key. When the desired control has the focus, you can emulate an Enter keypress. The disadvantage to this approach is that your application will stop working correctly if the software that it drives changes its hotkeys, accelerators, or Tab order. This can happen when a new version of the software is released, and it can be a serious problem if you are developing a testing application, since you are continually using new versions of the software. You can avoid this problem if the controls of the driven program support the read information methods of IAccessible. This lets you navigate to a UI element using Active Accessibility, as demonstrated in the sample program's FindChild function. Once you obtain an IAccessible interface/child ID pair for the UI element you're looking for, you can call the IAccessible method accLocation to get the coordinates of the UI element, position the mouse cursor over this element, and emulate a mouse action. Of course, if names, roles, and other properties of accessible elements change, a testing application would also fail to work correctly. But this is less likely than changing the order of controls or control items, thus making an approach that uses the read information methods of IAccessible more reliable than just navigation by keyboard. ====== end quote ================ Might be the way to go. OTOH Bruce's functions and win services may be just as adequate way to find a specific control, so no great benefit in using com accessible services.
