Wait for image unless webpage is 404.

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
garycee
Newbie
Posts: 17
Joined: Mon Jul 20, 2015 7:17 pm

Wait for image unless webpage is 404.

Post by garycee » Mon Jul 20, 2015 7:20 pm

Hi,

I hope you can help.

Making a scipt that includes waiting for an image to pause processing the rest of the script untill the webpage is open.

Although, sometimes the web page doesnt open.

I would like to loop 3 times while using the image to see if a webpage is open or stop the macro if it doesnt load within 30 seconds 3 times.

I got this far with that part so far:
WaitScreenImage>%BMP_DIR%\image1.bmp,0.7,CCOEFF

Thanks in advance or any help! =)

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: Wait for image unless webpage is 404.

Post by JRL » Tue Jul 21, 2015 2:56 am

Something like this?

Code: Select all

Let>WSI_TIMEOUT=10
Let>kk=0
Repeat>kk
  Add>kk,1
  WaitScreenImage>%BMP_DIR%\image1.bmp,0.7,CCOEFF
  If>WSI_TIMEDOUT=TRUE
    Let>ImageFound=Image was not found.
  Else
    Let>ImageFound=Image was found.
    Let>kk=3
  EndIf
Until>kk=3
MDL>ImageFound

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