Tool: "image recognition" dont work(

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
x-face
Newbie
Posts: 1
Joined: Mon Jun 01, 2020 9:58 am

Tool: "image recognition" dont work(

Post by x-face » Mon Jun 01, 2020 11:37 am

Hello, pls advise what can go wrong...

Tool: "image recognition". When i am run the script for the first time, always everything is going well.

But sometimes it recognizes the picture without any reason anywhere on the screen, hovever there is nothing even remotely similar.

I do not change the code, but sometime it works correct and sometime wrong, why?

Code: Select all

FindImagePos>C:\Users\Alex\Desktop\file.png,SCREEN,0.9,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
MouseMove>XArr_0,YArr_0
LClick
Message>I found this
wait>5
Else
Message>can't find it
wait>5
Endif

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Tool: "image recognition" dont work(

Post by Marcus Tettmar » Mon Jun 01, 2020 12:22 pm

Looks tolerance is too high. Probably getting a lot of false positive matches. Try lowering tolerance to around 0.7. Also make sure your capture doesn't have too much background - make sure it is tightly concentrated on what is unique about the image.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts