venkata Posted July 9, 2007 Share Posted July 9, 2007 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 More sharing options...
Paulie Posted July 9, 2007 Share Posted July 9, 2007 Post Code Please! Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted July 9, 2007 Share Posted July 9, 2007 What are the situations in the region that are changing. Are you possibly moving a window through the region. What is your goal, more information and your code would help a lot. Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 9, 2007 Share Posted July 9, 2007 (edited) 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. Edited July 9, 2007 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 More sharing options...
venkata Posted July 10, 2007 Author Share Posted July 10, 2007 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. 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 More sharing options...
PsaltyDS Posted July 10, 2007 Share Posted July 10, 2007 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? 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now