Jump to content

Recommended Posts

Posted

Ok here is the code I am using right now

While 1
$coord = PixelSearch( 0, 0, 1023, 1023, 0X4CF44C)
If Not @error Then
    MouseClick("middle",$coord[0],$coord[1],1,0)    
EndIf
WEnd

I was wondering I can get it to find the color and click, that is not the problem but I was wondering if it is possibe to find search 2 spots at the same time and only click when the 2 colors are so close.

meaning like this:

Posted Image

Have it only click one of the 2 green squares as they are the ones close together, and not click the other green squares, until it finds 2 green squares together again(the purple dots are just for show)

any help would be great, thanks

nick21

Posted

When you start saying you'd like it to do the same function twice, at the same time, it seems a lot like you'd like your script to do multi-threading, which AutoIt can't do... Couldn't you just do the two searches sequentially, compare the first to the second and only click if it's within the threshold you specify?

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
×
×
  • Create New...