Adergon Posted December 27, 2011 Posted December 27, 2011 Hey all, Recently started using imagesearch, thought it would be interesting (not) lol. Anyways, i got a little problem. #include <ImageSearch.au3> $x1=0 $y1=0 $result= _ImageSearch("recycle.bmp",1,$x1,$y1,125) If $result=1 Then MouseMove($x1,$y1,3) sleep(500) MouseClick("left") EndIf that's my code. It does find the recycle bin, BUT. sometimes the script clicks something random on my desktop. and not the recycle bin even when its visible. I don't udnerstand what the problem is. is it my code? Thanks!
sleepydvdr Posted December 27, 2011 Posted December 27, 2011 How about picking a second point in the picture and checking it's color. If the second check fails, then continue searching until you get two matches. #include <ByteMe.au3>
Adergon Posted December 28, 2011 Author Posted December 28, 2011 (edited) How about picking a second point in the picture and checking it's color. If the second check fails, then continue searching until you get two matches.So you mean like i add the command "else" and try again?EDIT: could you also please post an example. Edited December 28, 2011 by Adergon
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now