Jump to content
Sign in to follow this  
ink

PixelCheckSum Bug

Recommended Posts

ink

Hi.

everytime im running my script is a differnt value of the pixelchecksum i really dkn whats wrong

Opt("MouseCoordMode", 2)
Opt("PixelCoordMode", 2)


HotKeySet("{ESC}", "Terminate")

;variables...
$PCheckSum = 1314899972
$box_size = 30
$num_of_rows = 4
$num_of_columns = 10
$InvStartY = 319
$InvKey = "i"

Func inventory($key)
       send($key)
       
EndFunc

WinActivate("b")
inventory($InvKey);open inventory
For $rows = 1 To $num_of_rows step +1
   $InvStartX = 435
   For $cols = 1 to $num_of_columns step +1
                MouseMove($InvStartX, $InvStartY, 10)
                 $sum = PixelChecksum($InvStartX, $InvStartY, $InvStartX+$box_size, $InvStartY+$box_size)
                  ConsoleWrite("I koordinat (" & $InvStartX & "," & $InvStartY & ") er pixelchecksummen " & $sum & " (Hex=" & Hex($sum, 6) & ")")
                    If $sum = $PCheckSum Then
                   ConsoleWrite(" (Venstre musseknaip aktiveret)" & @LF)
                  MouseClick("left", $InvStartX, $InvStartY, 2, 10)
                 MouseClick("left", 100, 100, 1, 10)
               EndIf
               $InvStartX = $InvStartX + $box_size
       Next
       $InvStartY = $InvStartY +$box_size
Next
   
Func Terminate()
       exit
EndFunc
Edited by ink

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  

×