Jump to content
Sign in to follow this  
IamKJ

Image Search issues

Recommended Posts

IamKJ

I have ran into some issues with image search.  Every time I run the script, it never finds the image in the browser, but if I open the image directly on the desktop, it'll find it no problem.

 

Why is this? Any way around it?

 Func ImageSearchFarm ()
     Local $picture = 'C:\Users\Jammmesss\Desktop\AutoIt\New folder\Icon.png'
     Local $x1 = 0
     Local $y1 = 0
     Do
         $result = _ImageSearch($picture,1,$x1,$y1,0,0)

         ConsoleWrite ($result)
     until $result = 1;
     if $result=1 Then
         MouseMove($x1,$y1,50)
     else
         MsgBox (0,'MSG','End')
EndIf
     EndFunc

 

Share this post


Link to post
Share on other sites
IamKJ

Can be closed.  Figured it out.

Share this post


Link to post
Share on other sites
SoyArcano

First thing you must to include the library..  #include <ImageSearch.au3>

But i dont know why when i run your example show me.. Subscript used on non-accesible variable.. did you got this message too or not?

Share this post


Link to post
Share on other sites
IamKJ

No, I never received that message.

Share this post


Link to post
Share on other sites
spudw2k
On 3/27/2017 at 2:14 PM, IamKJ said:

Can be closed.  Figured it out.

It would be useful to the community to share how you solved it. 

Share this post


Link to post
Share on other sites
IamKJ

Just upped the tolerance a bit, somewhere between 50-100 is a good start, if there aren't too many images like the one you are searching for.

  • Like 1

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  

×