Jump to content

multiple colors pixel search


bass711
 Share

Recommended Posts

I search for some codes on the forum and I find a a lots of good ones but

wiich of those will work for I need my mouse to shoot 4 colors, one code that I find is

$CoordsA = PixelSearch =0xffffff and also this one $searchcolor = 0xFFFFFF it works great but how can I make it for multiple colors like this

$searchcolor = 0xFFFF00
$searchcolor = 0xFFFF05
$searchcolor = 0xFFFF06
$searchcolor = 0xFFFF55
 didnt work may be I need some command to time each color "sleep 100

help please. well Im gonna keep reading more topics is really good,

Edited by bass711
Link to comment
Share on other sites

Hi!

When your assigning the color to the same variable all the time you're actually just overwriting the old one.

Try saving each color in it's own variable or in an array, like this:

Global $array[4]=[0xFFFFFF,0xFFFF0000,0xFF00FF00,0xFF0000FF]

For $i=0 To UBound($array)-1
    $pos=PixelSearch(0,0,@DesktopWidth,@DesktopHeight,$array[$i])
    If Not @error Then
        MsgBox(64,"Color found!",Hex($array[$i],6)&" was found!")
    EndIf
Next

:mellow:

Broken link? PM me and I'll send you the file!

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...