tags:

views:

334

answers:

2

Anyone have any idea how to grab text from a QWidget window in a Windows application? This is what it looks like when I look at it using Winspector:

http://www.tightpoker.com/images/ftplobby.jpg

I would have posted that as an image but apparently new users aren't allowed to use image tags...

It can't find any sub classes (ie, for the list of tournaments). I'm trying to find a way to call for the list in a custom application being written to gather data.

A: 
Thanks for the reply. And since this is being run on a data scraping basis, I don't have any code running in the target application.Are you basically saying that you need to do some sort of injection or hooking while launching the application?
TightPoker
+1  A: 

Qt provides QAccessibility class for quite some time now, allowing screen readers like Narrator (Start->Run...->narrator) or Jaws to process the controls and read them to the user. As far as I can tell all the standard widgets supports this function since somewhere around qt4.

Unfortuneatly, when developer decides to implement his own control based on QWidged and does not implement QAccessibleInterface, then the created class is "mute" and invisible to any kind of inspector or screen reader. It becomes just a set of pixels on the screen.

Try running narrator and notice what it will say after opening ftplobby, "... contains no other known controls" means that you're probably out of luck, and should start looking into OCR and simulated clicks.

wuub