Getting data from a grid on external app using win32 API

MattNorman

Well-known member
Joined
May 22, 2021
Messages
98
Programming Experience
1-3
I am trying to figure out a way of getting data from an external control so that I can load it in to a database.

I can get a handle to the child control that I identified via Spy++ however using the SendMessage API in the normal format and the string builder format does not return any result.

I'm not entirely sure if the control I want to get data from is a ListView, DataGrid or some custom control that is being used.

Does anyone have any suggestions?

I did try this with a third party tool called UIPath and that was able to get the text so it is possible some way.

1624567856814.png
 
What's the response when you send a WM_GETTEXT message to the window?

As you've discovered, not all windows are WinForms controls. At the height to Win9x and WinXP, almost every major software company was peddling their own set of Windows controls.
 
Out of curiosity, why are you screen scraping another app?
 
What's the response when you send a WM_GETTEXT message to the window?

As you've discovered, not all windows are WinForms controls. At the height to Win9x and WinXP, almost every major software company was peddling their own set of Windows controls.
I was just getting a blank string back using WM_GETTEXT.

I suspect it is a custom control so have abandoned this option for the time being.
 
Out of curiosity, why are you screen scraping another app?
The app essentially allows you to run real time reports that refresh every 3 seconds but the app's front end is pretty old and is lacking a lot of functionality that would be useful to my employer.

The first option I tried was using the app's scripting system to run a report and export the data to a CSV file however that process took 10 seconds every time which was too slow.

You can purchase an adapter for the application where it can be setup to stream data out to a server on a configurable port number. This is obviously the ideal option but I need to be able to demonstrate the benefits of the app before discussing any sort of budget for third party tools.

The option I have settled on now is using keyboard and mouse simulation to export the report data. With the report already loaded on the screen the simulation can export the data in 2-3 seconds so it can keep up with the output of the source data.
 
Do a some searches in AutoIT and VB programming forums about interacting with the ThunderRT6 controls. There maybe a tidbit there about how to scrape data from the various controls made by that company.
 
Back
Top Bottom