## Recommended Posts

The code can be used for any changing pixels.

If something has a variable of a color, like flame then it will check around for similar.

Depending on the product searching it may need a increase or decrees in the step value.

When I beta tested this i was always getting a return and could not figure out why.

After i adjusted the step it worked perfect.

I increase the step it always returning. if never returning i decrees step.

still trying to perfect it.

Usage example.

```While \$t = 0
\$coord = PixelSearch(\$gLeft,\$gTop, \$gRight, \$gBottom, Hex(0x0000FF),10)
If Not @error Then
\$colorck = colorzone(\$coord[0],\$coord[1],10,0,2)
If \$colorck Then
MsgBox(0, "Yes", "Seems to be the same.")
EndIf
EndIf```

Function.

```; 5x5 compair(500,500,5,5)
;xxxxx o is center and reading point.
;xxxxx compairing all colors in the radius
;xxoxx if color is in range of 5 offset for none int returns in the radius then return true
;xxxxx try and use even numbers for best result
;xxxxx It will round otherwise
;
Func colorzone(\$x1, \$y1, \$square, \$offset, \$step = 0)
\$x2 = \$x1 - Int(\$square / 2)
\$y2 = \$y1 - Int(\$square / 2)
\$x3 = \$x1 + Int(\$square / 2)
\$y4 = \$y1 + Int(\$square / 2)
\$var = PixelGetColor(\$x1, \$y1)
\$coord = PixelSearch(\$x2, \$y2, \$x3, \$y4, \$var, \$offset, \$step)
If Not @error Then
Return True
Else
Return False
EndIf
EndFunc ;==>compair```

ENJOY!!

Edited by kcd-clan
Visit mEMy programs made.Iul - IulG-V Console - G-V Console_RandomLetter - _RandomLetter()Saftey Kill - Saftey Killcolorzone() = colorzone()

## Create an account

Register a new account

• ### Recently Browsing   0 members

×

• Wiki

• Back

• #### Beta

• Git
• FAQ
×
• Create New...