# finding pixelchecksum value on screen

## Recommended Posts

I have screen A that has the same black background with text and then i have screen b same text same background but in a different location everything is the exact same i just need to find the checksum value i recorded on screen A in screen B.

any thoughts would be helpful this is on the same computer btw.

##### Share on other sites

If second monitor is extended the coord is added. here i have two monitors.

First: 1280x800

Second: 1024x768

Results in: 2304x800

Just take a print and ctrl+v on paint and see resolution

I think second monitor start at 1281 But i cannot see how help you.

or is the same monitor? Please explain better

Edited by GordonFreeman

##### Share on other sites

this is on the same monitor im working off a laptop here is some code i threw together real fast

```#include <MsgBoxConstants.au3>

;make a small rectangle over an area grow it in order to find a pixelchecksum value

\$var1 = 20
\$var2 = 1
\$var3 = 290
\$var4 = 15

\$findchecksum = PixelChecksum(\$var1, \$var2, \$var3, \$var4)
\$count = 0
Do
\$count += 1
\$var2 += 1
\$var4 += 1
\$findchecksum = PixelChecksum(\$var1, \$var2, \$var3, \$var4)
Until \$findchecksum = 3213030855 or \$count > 1000

if \$findchecksum = 3213030855 Then
MsgBox(\$MB_SYSTEMMODAL, "Find Checksum", "Checksum Coordinates Found!", \$var1, \$var2, \$var3, \$var4)
Else
EndIf```

I also know that my value has to match in area from my other value i am using the following

http://www.mathopenref.com/coordrectareaperim.html

Edited by awayne

##### Share on other sites

oh my original value the reason for starting with 1 and 15 is the second and fourth coordinate values are 14 in difference so i have to increment by 1 for each as such

thanks to all who reply also not sure if i did the message box for the first condition on if right bc i have yet to meet that condition

##### Share on other sites

Starting to feel sorry for you now, cause this is all you post about.

```Func _FindChecksum(\$w, \$h, \$cksm); width, height, checksum
For \$y = 0 To @DesktopHeight - (\$h - 1)
For \$x = 0 To @DesktopWidth - (\$w - 1)
If PixelChecksum(\$x, \$y, \$x + \$w, \$y + \$h) = \$cksm Then
Local \$aCoords[2] = [\$x, \$y]
Return \$aCoords
EndIf
Next
Next
Return SetError(1, 0, 0)
EndFunc   ;==>_FindChecksum```
Edited by JohnOne

Monkey's are, like, natures humans.

##### Share on other sites

```#include <MsgBoxConstants.au3>

\$var1 = 20
\$var2 = 128
\$var3 = 290
\$var4 = 142

\$findchecksum = PixelChecksum(\$var1, \$var2, \$var3, \$var4)
\$count = 0

Do
\$count += 1
;\$var1 += 1
\$var2 += 1
;\$var3 += 1
\$var4 += 1
\$findchecksum = PixelChecksum(\$var1, \$var2, \$var3, \$var4)
Until \$findchecksum = 3666222030 or \$count > 1000

if \$findchecksum = 3666222030 Then
MsgBox(\$MB_SYSTEMMODAL, "Find Checksum", "Checksum Coordinates Found! " & \$var1 & "," & \$var2 & "," & \$var3 & "," & \$var4)
Else
EndIf```

above is working code seems to work if something is in a row/list and if you move the value around this will find it one would have to go up or down so that would be depending on adding or subtracting

##### Share on other sites

take a look at fast find it might help

'?do=embed' frameborder='0' data-embedContent>>

## Create an account

Register a new account