I want to be able to continue a program if a certain image is lost on the screen. With WaitScreenImage, the program will continue only after the image is found on the screen, but I want to perform a command where the program only continues if the image is gone. To be specific, I want to continue the program if the webpage stopped being one blank screen.
Is there a way around it?
Thanks for reading.
Reverse Wait Screen Image
Moderators: Dorian (MJT support), JRL
- Dorian (MJT support)
- Automation Wizard
- Posts: 1386
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
Re: Reverse Wait Screen Image
That's a very interesting question.
How about sampling the big blank page with the Image Recognition Wizard, and taking it from there. Like this :
Or if it's a web page, you could always extract the page body, and parse the html to detect whether it's blank or contains certain information.
How about sampling the big blank page with the Image Recognition Wizard, and taking it from there. Like this :
Code: Select all
//Sample your blank page as an image (which will probably be a large white rectangle, and in this example is named image_1.bmp)
Label>CheckPage
FindImagePos>%BMP_DIR%\image_1.bmp,SCREEN,0.7,1,XArr,YArr,NumFound,CCOEFF
//If it doesn't find the big white image, NumFound will be 0
If>NumFound=0
//Your action script goes here
MessageModal>The area is no longer blank
//If NumFound isn't 0, the white image is still present, so we check again.
Else
Goto>CheckPage
Endif
Yes, we have a Custom Scripting Service. Message me or go here
Re: Reverse Wait Screen Image
It's a known image, right? Because sometimes I find it shorter to use GetPixelColor. Pick 5 areas on the image (or more) and use GetPixelColor to look for specific colors on the screen. When it does not find the colors, it continues to do something else.
Or the reverse. If you want to wait for a blank page to go away, get pixel colors on the page that will be there only after the blank page is gone.
Ofcourse, I don't know if the image is in the same place on the screen all the time. So there may be issues I am unaware of.
The nice thing about this method is you don't need to do screen captures.
PepsiHog
Or the reverse. If you want to wait for a blank page to go away, get pixel colors on the page that will be there only after the blank page is gone.
Ofcourse, I don't know if the image is in the same place on the screen all the time. So there may be issues I am unaware of.
The nice thing about this method is you don't need to do screen captures.
PepsiHog
Windows 7
PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)
The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!
PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)
The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!