J0ker Posted January 29, 2007 Share Posted January 29, 2007 (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 January 29, 2007 by J0ker Link to comment Share on other sites More sharing options...
Helge Posted January 29, 2007 Share Posted January 29, 2007 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 More sharing options...
J0ker Posted January 29, 2007 Author Share Posted January 29, 2007 (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 January 29, 2007 by J0ker Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 29, 2007 Moderators Share Posted January 29, 2007 (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 January 29, 2007 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 More sharing options...
J0ker Posted January 29, 2007 Author Share Posted January 29, 2007 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) 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