Jump to content

need help with simple process


Kilo
 Share

Recommended Posts

I made a script that looks for a pixel and then clicks the pixel, but what would i add to this if i wanted it to search for more than one color so it would click if either color showed up?

While 1=1
$coor = PixelSearch( 40, 85, 444, 576, 0x3f3f3f, 0, 1 )
if not @error then
MouseClick ( "left" , $coor[0] , $coor[1] , 1 , 2  )
Else
sleep (1500)
endif
Wend

help much appreciated

Link to comment
Share on other sites

While 1=1
    Dim $colors[2] = ["0x3f3f3f","0xFF0000"]
    For $i = 0 to Ubound($colors) -1
        $coor = PixelSearch( 40, 85, 444, 576, $colors[$i], 0, 1 )
        if not @error then
            MouseClick ( "left" , $coor[0] , $coor[1] , 1 , 2  )
        Else
            sleep (1500)
        endif
    Next
WendoÝ÷ Ø:'ßÛ_¢¸µ©Þ±Æ©{ú®Ù¶"·¢iÛ(ëax%G©àx-å¡W¥w­¡«­¢+Ù]¡¥±]¥¹Ñ¥Ù ÅÕ½Ðí]¥¹½Ý9µÅÕ½Ðì

Edited by spudw2k
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...