if + Image Recognition

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
xav
Newbie
Posts: 5
Joined: Fri Nov 01, 2013 8:20 pm

if + Image Recognition

Post by xav » Tue Nov 05, 2013 8:01 pm

Dear Forum Members,

Need your professional advice, I need to split together "If" condition + Image Recognition.

I have for example 3 images captured.

If image 1 is found -> mgs> image1
If image 2 is found -> msg> image2
If image 3 is found -> msg> image3

Something like :

Code: Select all

if>WaitScreenImage>C:\Users\Desktop\111111.bmp,0
does not work

xav
Newbie
Posts: 5
Joined: Fri Nov 01, 2013 8:20 pm

Post by xav » Tue Nov 05, 2013 8:56 pm

Found this in tutorial and changed a little

Code: Select all

FindImagePos>C:\Users\Desktop\22222222.bmp,SCREEN,0,0,XArr,YArr,imgs


If>imgs>0
 msg>found
Endif

It works, but i need to wait till one of images become = true instead of find instantly if image is =true

how to do that?

User avatar
Rain
Automation Wizard
Posts: 550
Joined: Tue Aug 09, 2005 5:02 pm
Contact:

Post by Rain » Tue Nov 05, 2013 11:48 pm

Use WaitScreenImage>C:\Users\Desktop\22222222.bmp or pleace FindImagePos> inside a loop.

Code: Select all

Label>Loop
FindImagePos>C:\Users\Desktop\22222222.bmp,SCREEN,0,0,XArr,YArr,imgs


If>imgs>0
  msg>found
Endif

Wait>1
Goto>Loop

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