--- 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>
> > 
> > It says:
> > 
> > "for each child, find the child ID and verify whether this child supports 
> > the IAccessible interface by getting a pointer to the IDispatch interface 
> > and querying it for an IAccessible interface."
>  
> > I think to click a menu item you will need an accessible menu item, not a 
> > child of a menu bar. Menu bar does not do default actions. Menu items do.
> 
> You're right:
> 
> Menu Item Object:
> http://msdn.microsoft.com/en-us/library/dd373590%28VS.85%29.aspx
> 
> Menu Bar Object:
> http://msdn.microsoft.com/en-us/library/dd373589%28VS.85%29.aspx
> 
> but:
> 
> "Menus are a constant pain point, they're both hard to inspect, since they 
> disappear when they lose focus, and most applications mess with them 
> differently."
> 
> http://social.msdn.microsoft.com/Forums/en-US/windowsaccessibilityandautomation/thread/5dd63d0f-7964-4039-9e88-15ce8cc188bc
> 
> =======================
> 
> Meanwhile, just posted up:
> 
> comPlugin0.70_091105.zip
> in
> http://tech.groups.yahoo.com/group/power-pro/files/0_TEMP_/AlansPluginProvisional/
> 
> Which has accessible_child, accessible_children
> 
> They return either another IAccessible, or an integer.
> They take 
> 
>   com_handle[, name[, role]]
> 
> You can find name, role using Accessible Explorer from MSAA SDK
> http://www.microsoft.com/downloads/details.aspx?familyid=3755582A-A707-460A-BF21-1373316E13F0&displaylang=en
> 
> 
> E.g: if hwnd is HWND for wordpad
> 
> local hAO = com.get_accessible_object(hwnd, OBJID_MENU) 
> win.debug("Handle to OBJID_MENU:", hAO)
> if (!hAO)
>   quit
> 
> win.debug("accChildCount OBJID_MENU:", hAO.accChildCount())
> 
> ;returns IAccessible or integer
> hBar = hAO.get_accessible_child("Application", "menu bar")
> 
> accessible_children can return a vector if it gets more than one
> match. 
>
> name and role can be omitted or empty string, 
> or have trailing * for partial match,
> 
> So possible to navigate down a tree of accessibles. Still can;t
> make then do much of anything except cough up their names and
> roles and suchlike. 

My previously working script is again not working.

With version .65 it successfully used:
local hTom = com.get_accessible_object(riched, "dispatch")

With version .67 "dispatch" needed to be removed:
local hTom = com.get_accessible_object(riched)

That gives bad params error with version .70; ditto with addition param of  
"dispatch".

Regards,
Sheri

Reply via email to