Jump to content
Sign in to follow this  
Darknightx37

If status "Tolerance"

Recommended Posts

Darknightx37

Hay guys maybe someone of you can help me if i have two colours that are saved in variables how can i use them in an if clauses with a tolerance on them like this:

$pos = MouseGetPos()

    Local $iColor = PixelGetColor($pos[0] -1, $pos[1] -1)
$maincolour = $iColor

while 1

Local $iColor2 = PixelGetColor($pos[0] -1, $pos[1] -1)
$checkcolour = $iColor2

if $checkcolour <> $maincolour Then   ;<------- HERE IT CHECKS IF THE COLOURS MISSMATCH BUT I WONT A LITTLE TOLERANCE ON IT
    msgbox(0, "Warning!", "colours missmatches.")
    TogglePause()
EndIf
ToolTip("Switched colour = " & $checkcolour & "  Main colour = " &  $maincolour,0,0)
WEnd

I already tried   While $checksum = PixelChecksum($pos[0] -1, $pos[1] -1,$pos[0] -2, $pos[1] -2,)  is still not working PLS HELP ME

sorry for my bad english.

thank you for all your help :-)

Edited by Darknightx37

Share this post


Link to post
Share on other sites
Darknightx37

okay guys i got it myself 

closed

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  

×