Jump to content
Sign in to follow this  
bvr

return PixelCheckSum

Recommended Posts

bvr

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 by bvr

Share this post


Link to post
Share on other sites
somdcomputerguy

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

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()')
EndIf

I know that when you add in "If @error Then" it will override the @error crash with whatever you put in the if statement.

Edited by Epdmk

Share this post


Link to post
Share on other sites
bvr

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

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.