bvr Posted September 25, 2010 Posted September 25, 2010 (edited) I am using return PixelCheckSum in my script. I am attempting to check a pixelchecksum of an area, and I want it to return true, but if it returns false I don't want the script to end, I want it to do something else. How would I do this with autoit. return PixelCheckSum($TitleScreen[1], $TitleScreen[2], $TitleScreen[3], $TitleScreen[4], $TitleScreen[5]) == $TitleScreen[0] Edited September 25, 2010 by bvr
somdcomputerguy Posted September 25, 2010 Posted September 25, 2010 (edited) Return Value Success: Returns the checksum value of the region. Failure: Returns 0. So maybe something like this? If Not PixelCheckSum($TitleScreen[1], $TitleScreen[2], $TitleScreen[3], $TitleScreen[4], $TitleScreen[5]) Then ;; Do This.. Else ;; Do This Instead.. EndIf<br>Or perhaps the example code here, PixelChecksum, will help some.<br> Edited September 25, 2010 by somdcomputerguy - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
Pottery Posted September 26, 2010 Posted September 26, 2010 (edited) return PixelCheckSum($TitleScreen[1], $TitleScreen[2], $TitleScreen[3], $TitleScreen[4], $TitleScreen[5]) == $TitleScreen[0] If @error Then MsgBox(64, 'Error', 'An error has occured with: PixelCheckSum()') EndIfI know that when you add in "If @error Then" it will override the @error crash with whatever you put in the if statement. Edited September 26, 2010 by Epdmk
bvr Posted September 27, 2010 Author Posted September 27, 2010 Seems to be some kind of error. It keeps skipping over the function and going to the next one.
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