Jump to content

Store PixelChecksum?


J0ker
 Share

Recommended Posts

Hi,

In my script, I'm using PixelChecksum and I want to store the variable. At the beginning , my script scan a selected area with Pixelchecksum and later in the script i want to compare my first scan to see if the selected area is still the same. Is there a way to do that?

I want something like that:

;Variable
$Check = PixelChecksum(608,132,794,397)

While 1
$Check ; Do the Pixelchecksum ( What do i write to launch the check?)

;blabla
;blabla
;blabla

If $Check <> $Check then ; If at this point the selected area is not the same as the beginning of the script
sleep(1000)

Else

;blabla

EndIf



Wend
Edited by J0ker
Link to comment
Share on other sites

How can $check be different than itself ? :) Use two variables so that you can match them.

Something like this... it's untested but it might work. At least you should get the concept.

$checksum = PixelChecksum(608,132,794,397)

While 1
    $checksum_test = PixelChecksum(608,132,794,397)
    
    If $checksum_test <> $checksum Then
        $checksum = $checksum_test
        ; changed !
        Sleep(1000)
    EndIf
WEnd
Link to comment
Share on other sites

So it's like if I was running 2 independant checksum on the same area?

One that wont change and another that will change ( if I have multiple checksum to do and then compare with the first one).

If I write $checksum_test = PixelChecksum(608,132,794,397) in my script, does it will run the check when the script pass over it? If not then the 2 pixelchecksum will happen at the same time ( during the if statement) and it will always be equal.

Edited by J0ker
Link to comment
Share on other sites

  • Moderators

You run one CheckSum to get the initial value, then in the loop, your checking against that initial value with your current checksum checks.

Edit:

For better clarification, you are only ever doing 1 PixelCheckSum() at a time.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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