Sign in to follow this  
Followers 0
J0ker

Store PixelChecksum?

5 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

[center]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.[/center]

Share this post


Link to post
Share on other sites

If there's no loop, do you think it will work?

Well there's a loop, but the 2 Pixelchecksum are inside the loop ( one at the beginning and the others at the end)

Share this post


Link to post
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
Sign in to follow this  
Followers 0