Jump to content

PixelChecksum


Recommended Posts

Hi All,

I generated Auti-it scripts to check a particular region. While running scripts I found that for the same region Pixel checksum values is chaning time to time. Please help me why this happens and what might be possible reasons for this.

thanks,

venkat

Link to comment
Share on other sites

I generated Auti-it scripts to check a particular region. While running scripts I found that for the same region Pixel checksum values is chaning time to time. Please help me why this happens and what might be possible reasons for this.

This question is asked a lot.

The function PixelChecksum() should only be used to check for changes to a current screen area. It does not provide a reliable 'hash', or repeatable value from day to day. Any change in display settings like resolution, gamma level, anti-aliasing and font smoothing effects, etc., will change the results. Games with active lighting effects and texture mappings would make it even less likely to be repeatable.

AutoIt always pulls a 24-bit color, but your graphics engine might be running 16, 20, 30, or 36-bit color, so a transform is being done in getting the number, which uses statistical math to get mean values. Very good "on average" but not a deterministic number you can rely on.

PixelChecksum() is a reliable check to see if something has changed moment-to-moment during a particular session. It is very unreliable for something like OCR where you hope to match something session-to-session. In pretty much any situation where you try to save the checksum value to a file for later use, you will not get good results.

:whistle:

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

This question is asked a lot.

The function PixelChecksum() should only be used to check for changes to a current screen area. It does not provide a reliable 'hash', or repeatable value from day to day. Any change in display settings like resolution, gamma level, anti-aliasing and font smoothing effects, etc., will change the results. Games with active lighting effects and texture mappings would make it even less likely to be repeatable.

AutoIt always pulls a 24-bit color, but your graphics engine might be running 16, 20, 30, or 36-bit color, so a transform is being done in getting the number, which uses statistical math to get mean values. Very good "on average" but not a deterministic number you can rely on.

PixelChecksum() is a reliable check to see if something has changed moment-to-moment during a particular session. It is very unreliable for something like OCR where you hope to match something session-to-session. In pretty much any situation where you try to save the checksum value to a file for later use, you will not get good results.

:whistle:

Thank you very much for your reply.

Could you please let me know is there any other way to check this.

thanks,

venkat

Link to comment
Share on other sites

Thank you very much for your reply.

Could you please let me know is there any other way to check this.

Is it a graphical area in a game, or a control on a GUI, or ...what?

:whistle:

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

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...