Page 1 of 1

UI Automation v. Acc (MSAA: Microsoft Active Accessibility)

Posted: 10 Aug 2018, 12:46
by jeeswg
If anyone knows of any useful things that UI Automation can do, that Acc (MSAA: Microsoft Active Accessibility) can't, I would be interested. Thanks.

There are some links here re. UI Automation:
Creating COM Object Event Handler - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 77#p171077

Here is a script that uses both UI Automation and Acc:
Text Capture [ACC viewer] - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=53700

[EDIT:] Any links to AHK scripts or mentions of external programs that use Acc or UIA would also be interesting.

Re: UI Automation v. Acc (MSAA: Microsoft Active Accessibility)

Posted: 10 Aug 2018, 14:15
by Frosti
Yes there's something it can do better. Help's me to not understand it.

Re: UI Automation v. Acc (MSAA: Microsoft Active Accessibility)

Posted: 11 Aug 2018, 11:13
by jethrow
One of the things that really interested me about UI Automation is the ability to find elements in a treescope based on given criteria - see IUIAutomationElement::FindFirst & IUIAutomationElement::FindAll

Here's an old example for FireFox: FFWait.ahk

Re: UI Automation v. Acc (MSAA: Microsoft Active Accessibility)

Posted: 11 Aug 2018, 12:49
by jeeswg
- @jethrow: Thanks for the info.
- Nice to see you on the forums again, it's a pleasure to have you on one of my threads.
- Thanks so much for AccViewer, iWB2 Learner, WBGet, and your COM examples thread, 4 threads that spring to mind.
- I have added a 'by jethrow' list, here:
best utilities + best AutoHotkey scripts (+ useful tips) - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=7&t=28149
- I would be interested to know if you have any plans or hopes for AccViewer/UIA/iWB2 Learner, for the future. Or the same for any other programming projects.
- (I've been struggling to get iWB2 Learner to handle any % zoom, I will try again to fix it at some point. It's mostly there except for iframes within iframes.) Cheers.
Internet Explorer get element under cursor (show borders, show text) (any zoom percentage) - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=29458

Re: UI Automation v. Acc (MSAA: Microsoft Active Accessibility)

Posted: 11 Aug 2018, 18:13
by jethrow
No problem. "Active" is a strong word, but I seek to please. Again, np - the AHK community has blessed me more that I've contributed. Thanks for the recognition, but for COM/ACC stuff props really go to folks like lexikos, Sean, tank & fincs.
... any plans ... for the future. Or the same for any other programming projects.
Not with AHK - though it still bothers me that UIA_Interface is unfinished. Hopefully it'll be superseded with a better wrapper or new MS interface.
I've been struggling to get iWB2 Learner to handle any % zoom, I will try again to fix it at some point. It's mostly there except for iframes within iframes.
Perfect - I'll check that off on my mental todo list of bugs.

Re: UI Automation v. Acc (MSAA: Microsoft Active Accessibility)

Posted: 15 Aug 2018, 05:02
by malcev
jeeswg, You can download Inspect tool.
https://github.com/blackrosezy/gui-inspect-tool
You can change mode from UI Automation to MSAA in this tool to check differences.
For example UI Automation shows ProcessId and RuntimeId of control, but MSAA not.

Re: UI Automation v. Acc (MSAA: Microsoft Active Accessibility)

Posted: 15 Aug 2018, 07:14
by jeeswg
- @malcev: Thanks for the info. Appreciated.
- @jethrow: Yes, these mental to-do lists that go on forever. AFAIAC, other than the zoom issue, the non-UIA scripts all looked finished to me, although maybe you had other feature ideas, which could be interesting if other people wanted to work on those scripts or similar scripts. I haven't tested the UIA script although I would gladly see it progress in time.

Re: UI Automation v. Acc (MSAA: Microsoft Active Accessibility)

Posted: 03 Oct 2018, 18:41
by jeeswg
One thing of interest, in Acc, is that the left-click action can usually be invoked via accDoDefaultAction. But what about the right-click action? I usually use accLocation to get the GUI element's coordinates and then AHK's MouseClick command to right-click it.