Jump to content

Recommended Posts

Posted

I am attempting to control an application where I need to detect changes in the text displayed in a status bar. But the status bar is owner drawn, therefore you can't get at the text directly. All of that has been discussed at length in a separate thread.

So, now what I want to try is computing a checksum on the part of the status bar that I care about, and compare that checksum to a checksum that has been computed when I know that the status bar is displaying the specific text that I am waiting for.

I wrote some code to test out this approach, but it doesn't seem to be working right. The pixel checksum values are changing even when everything in the application window is completely static, not changing at all.

Can anyone tell me what I am doing wrong? The code that I am trying to use is attached.

Thanks,

Kevin M.

Posted

I am attempting to control an application where I need to detect changes in the text displayed in a status bar. But the status bar is owner drawn, therefore you can't get at the text directly. All of that has been discussed at length in a separate thread.

So, now what I want to try is computing a checksum on the part of the status bar that I care about, and compare that checksum to a checksum that has been computed when I know that the status bar is displaying the specific text that I am waiting for.

I wrote some code to test out this approach, but it doesn't seem to be working right. The pixel checksum values are changing even when everything in the application window is completely static, not changing at all.

Can anyone tell me what I am doing wrong? The code that I am trying to use is attached.

Thanks,

Kevin M.

I see now that the coordinates for PixelChecksum must be screen coordinates rather than window coordinates, since there is no window identifier argument to the function (well DUH!). So, this means that 1) my code needs to add the top left window coordinates (easily done), and 2) this code will only work while the target application window is on top. That's a bummer, because I need to be able to do this while the application window is *inactive*, and very likely hidden behind other windows, maybe even minimized. :-(

Seems like every thing I try to do with this application using AutoIt is running up against brick walls.

Kevin M.

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
  • Recently Browsing   0 members

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