Jump to content

Scraping a label in a window


Recommended Posts

I'm working with this program that I'm trying to read the label inside one of the dialog boxes.

I used the Autoit Window Info tool, but it isn't showing up in the active text. Some of the buttons around it are.

The class of the control is ThunderRT6UserControlDC, which appears to be a label.

This also happens with MSFlexGridWndClass which is some sort of spreadsheet control. Any ideas?

Link to comment
Share on other sites

I'm working with this program that I'm trying to read the label inside one of the dialog boxes.

I used the Autoit Window Info tool, but it isn't showing up in the active text. Some of the buttons around it are.

The class of the control is ThunderRT6UserControlDC, which appears to be a label.

This also happens with MSFlexGridWndClass which is some sort of spreadsheet control. Any ideas?

Those controls are not drawn by the standard Windows APIs, so AutoIt can't work with them using its normal API calls. If the app that does draw them does not expose any COM interface that AutoIt could use, you may just be out of luck. This has come up in reference to the Grid controls before, with no solution yet that I know of.

:)

Edit: Typo.

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Those controls are not drawn by the standard Windows APIs, so AutoIt can't work with them using its normal API calls. If the app that does draw them does not expose any COM interface that AutoIt could use, you may just be out of luck. This has come up in reference to the Grid controls before, with so solution yet that I know of.

:)

I know this might be somewhat complex, but I know a lot of video games are scraped using AutoIT. I mean, they literally search for something at a specific pixel location. Can't I do something like that? I know I will probably be opening up a can of worms, but I really need this functionality. I'm sure if people can scrape video games, they can scrape anything, right?

Link to comment
Share on other sites

I know this might be somewhat complex, but I know a lot of video games are scraped using AutoIT. I mean, they literally search for something at a specific pixel location. Can't I do something like that? I know I will probably be opening up a can of worms, but I really need this functionality. I'm sure if people can scrape video games, they can scrape anything, right?

Yes, you can work with it as a graphic. It won't be easy. Good luck with it.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

If any text in the window changes, the problem becomes easier by an order of magnitude. Simple use a memory searching program like Cheat Engine or T-Search, and search for the values in memory. From there, you can find everything from the process launcher, the window PID, the memory information around the event you're trying to work with, and so on. Might even be feasible even if the text doesn't change, so long as it's unique.

Link to comment
Share on other sites

Okay I can't give out too much information due to the nature of my work, but I'll say that it's a financial institution software.

Now I have a list of names to search for. I've automated everything up to the point where it searches the names. Sometimes multiple names come up, or the same name comes up multiple times and there are phantom accounts and only one true account. The way you can usually tell is that the true account will have fields like DOB, and Tax ID populated. So, I want to figure out which account is the true account and make the script select that account. You'd think I could make the program Copy the result cells but alas, they are not that interactive. So, back to my original question, how can I read pixels relative to that particular dialog boxes position. Anotherwords, the pixel within the application may be slightly off because the dialog box position can be moved around, but it will ALWAYS be in the same place relative to the xy of the dialog box itself.

Hope that makes sense.

Thanks for all the help guys.

Link to comment
Share on other sites

Any ideas on the pixel search thing?

What about the memory searching technique? How would I integrate those things into an AutoIT script?

I don't expect people to do my work for me but I need a little bit more to go on. Thanks again everyone.

Link to comment
Share on other sites

  • 2 weeks later...

I'm also attempting to do a memory scrape. The only problem is all my memory addresses return "0" for their values. You guys got any ideas on what's wrong here?

CODE
Local $iCount

Local $iCountMin = 0x00400000

Local $iCountInc = 0x010000

Local $iCountMax = 255

While $iCount<$iCountMax

$iCount += 1

$iCountMin += $iCountInc

$test = _MemoryRead(Hex($iCountMin), $DllInformation)

If @Error Then

O("ERROR:Failed to read memory at address" & Hex($iCountMin) & "(" & $iCountMin & "). Exiting loop.")

ExitLoop

EndIf

O("Read " & Hex($iCountMin) & "(" & $iCountMin & "):" & $test)

WEnd

Yes, I know I could vastly cut down on the variables here... I'm just trying to get things working first.

Other info: Vista x64 Ultimate Garbage edition. Using the NomadMemory include... does it still work? I've tried executing the compiled prog as admin as well. No change.

Any and all help is greatly appreciated!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...