Sign in to follow this  
Followers 0
Adergon

Imagesearch help

3 posts in this topic

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!

Share this post


Link to post
Share on other sites



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>

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 by Adergon

Share this post


Link to post
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
Sign in to follow this  
Followers 0