bvr 0 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 Share this post Link to post Share on other sites
somdcomputerguy 103 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. Share this post Link to post Share on other sites
Pottery 0 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 Share this post Link to post Share on other sites
bvr 0 Posted September 27, 2010 Seems to be some kind of error. It keeps skipping over the function and going to the next one. Share this post Link to post Share on other sites