Jump to content



Photo

return PixelCheckSum


  • Please log in to reply
3 replies to this topic

#1 bvr

bvr

    Wayfarer

  • Active Members
  • Pip
  • 74 posts

Posted 25 September 2010 - 02:29 AM

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, 25 September 2010 - 02:29 AM.








#2 somdcomputerguy

somdcomputerguy

  • Active Members
  • PipPipPipPipPipPip
  • 2,385 posts

Posted 25 September 2010 - 05:46 AM

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, 25 September 2010 - 12:37 PM.

- Bruce /* somdcomputerguy */If you change the way you look at things, the things you look at change.

#3 Pottery

Pottery

    Adventurer

  • Active Members
  • PipPip
  • 139 posts

Posted 26 September 2010 - 03:25 AM

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, 26 September 2010 - 03:27 AM.


#4 bvr

bvr

    Wayfarer

  • Active Members
  • Pip
  • 74 posts

Posted 27 September 2010 - 03:40 AM

Seems to be some kind of error. It keeps skipping over the function and going to the next one.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users