Need the opposite of WaitScreenImage

General Macro Scheduler discussion

Moderators: Dorian (MJT support), JRL

Post Reply
kevinkalexander
Newbie
Posts: 5
Joined: Mon Dec 16, 2013 5:56 pm
Location: Richardson, TX, USA
Contact:

Need the opposite of WaitScreenImage

Post by kevinkalexander » Fri Oct 14, 2016 2:57 pm

I need a function that essentially does the opposite of WaitScreenImage. I need to know when the screen image is no longer on the screen. Is there any such function? Because they can land on any number of other pages I don't want to have to wait for any one of those pages to come up. It's an exhaustive list. I just need to know that they've navigated away from the screen I was looking for.

It's easy enough to create a loop and use WSI_TIMEOUT=1 and check WSI_TIMEDOUT, but I was just curious if there was something like a WaitScreenImageGone function.
Kevin K Alexander

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

Re: Need the opposite of WaitScreenImage

Post by Marcus Tettmar » Fri Oct 14, 2016 7:50 pm

WaitScreenImage is just FindImagePos in a loop. All we need to do is reverse the criteria.

Code: Select all

Let>NumFound=1
While>NumFound>0
  FindImagePos>%BMP_DIR%\needle.bmp,SCREEN,0.7,XArr,YArr,NumFound
  Wait>0.02
EndWhile
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