Jump to content

Pixel/Color detection?


ciraco
 Share

Recommended Posts

RTFM!!

Pixelsearch()

Yeah I did a search on the forum and I found a script that does color search, but I dont know the varieables as to how to make it find a specific color and what not

Sleep (5000)
Send("L")
Sleep (1000)
MouseClick("left")
Sleep (1000)

While 1
    $coor = PixelSearch( 129, 104, 423, 169, 0x3489e3, 2, 2 )
    If @error = 0 Then
        Opt("SendKeyDownDelay", 300000);will hold Space down for 5 min or until pixelcolor changes ??
        Send("{SPACE}")
        While 1
            $coor = PixelSearch( 129, 104, 423, 169, 0x3489e3, 2, 2 )
            If @error = 1 Then
                Opt("SendKeyDownDelay", 5)
                Send("{SPACE}")
                ExitLoop
            eNDiF
        Wend
    EndIf
Wend
Link to comment
Share on other sites

Damn me and my generosity... :)

$Color = 0xFF0000;Color to search for (Red)
$Offset = 10 ; Clicks 10 pixels lower than the found pixel

While 1
$Search = PixelSearch(0,0,@Desktopwidth,@Desktopheight,$Color);Searches whole screen (From (0,0) to (Width,Height)) for color
If not @error then MouseClick("Left", $Search[0],$Search[1]+$Offset, 1,0)
WEnd
Link to comment
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
 Share

  • Recently Browsing   0 members

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