Page 2 of 2

Re: Automate app with no (or hidden) controls?

Posted: 22 Apr 2018, 19:10
by Frosti
okay this is from AutoIT Forum - an old thread from 2011
https://www.autoitscript.com/forum/topi ... -qwidgets/

The interesting thing I found was this:
Qt is a framework which wraps, or masks, the underlying native Win32 controls within it's GUI. Like other similar frameworks and languages (such as Java), Qt includes accessibility features which allow other non-Qt applications to interact with the framework.
If you read this. http://doc.qt.io/qt-5/accessible.html.
You found the following comment:
Applications do not usually communicate directly with the assistive tools, but through a platform specific API. Generally the communication with the ATs works though an IPC mechanism. Semantic information about user interface elements, such as buttons and scroll bars, is exposed to the assistive technologies. Qt supports Microsoft Active Accessibility (MSAA) and IAccessible2 on Windows, macOS Accessibility on macOS, and AT-SPI via DBus on Unix/X11. The platform specific technologies are abstracted by Qt, so that applications do not need any platform specific changes to work with the different native APIs. Qt tries to make adding accessibility support to your application as easy as possible, only a few changes from your side may be required to allow even more users to enjoy it.
It looks like, to communicate with QtWidgets is only possible if your application uses the QAccessibleInterface. So if you use the ACCViewer and can’t get any information about Qt UI-Elements, it seems to be impossible to do it the easy way. One of the most known applications based on the Qt framework is VLC. I don’t like it. So I can’t test it with ACCViewer. Are you getting any information from VLC?

It takes time to find this. Maybe this is useful for you. It’s a Qt Spy like the MS UISpy.exe.
https://github.com/KDAB/GammaRay/wiki/Getting-GammaRay

But I feel there’s no easy way to solve your problem.

Re: Automate app with no (or hidden) controls?

Posted: 24 Apr 2018, 04:36
by apoklyps3
Yes. As stated with Acc I can retrieve information about UI-Elements (objects)

Re: Automate app with no (or hidden) controls?

Posted: 24 Apr 2018, 06:05
by trey ton
Frosti wrote:okay this is from AutoIT Forum - an old thread from 2011
https://www.autoitscript.com/forum/topi ... -qwidgets/

The interesting thing I found was this:
Qt is a framework which wraps, or masks, the underlying native Win32 controls within it's GUI. Like other similar frameworks and languages (such as Java), Qt includes accessibility features which allow other non-Qt applications to interact with the framework.
If you read this. http://doc.qt.io/qt-5/accessible.html.
You found the following comment:
Applications do not usually communicate directly with the assistive tools, but through a platform specific API. Generally the communication with the ATs works though an IPC mechanism. Semantic information about user interface elements, such as buttons and scroll bars, is exposed to the assistive technologies. Qt supports Microsoft Active Accessibility (MSAA) and IAccessible2 on Windows, macOS Accessibility on macOS, and AT-SPI via DBus on Unix/X11. The platform specific technologies are abstracted by Qt, so that applications do not need any platform specific changes to work with the different native APIs. Qt tries to make adding accessibility support to your application as easy as possible, only a few changes from your side may be required to allow even more users to enjoy it.
It looks like, to communicate with QtWidgets is only possible if your application uses the QAccessibleInterface. So if you use the ACCViewer and can’t get any information about Qt UI-Elements, it seems to be impossible to do it the easy way. One of the most known applications based on the Qt framework is VLC. I don’t like it. So I can’t test it with ACCViewer. Are you getting any information from VLC?

It takes time to find this. Maybe this is useful for you. It’s a Qt Spy like the MS UISpy.exe.
https://github.com/KDAB/GammaRay/wiki/Getting-GammaRay

But I feel there’s no easy way to solve your problem.
wow that is such good information

so is there a way to call qt buttons if u know their name?