Jump to content

Recommended Posts

Posted (edited)

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...