Image Recognition if image not found?

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
eugekiller
Newbie
Posts: 17
Joined: Thu Mar 05, 2015 1:45 pm

Image Recognition if image not found?

Post by eugekiller » Sat Mar 07, 2015 8:47 pm

Hi wanted to know if i can change this

FindImagePos>%BMP_DIR%\image_16.bmp,WINDOW:BlueStacks App Player,0.7,1,XArr,YArr,Image_16_Found,CCOEFF
if>Image_2_Found>0,help

but to do if this image is not there?

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

Re: Image Recognition if image not found?

Post by Marcus Tettmar » Mon Mar 09, 2015 10:47 am

Sure. This returns the number of matches in Image_16_Found so if the image is not present this will be zero. So you can just do:

Code: Select all

If>Image_16_Found=0
  //image is not there ... 
Endif
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