Jump to content
Macro Express Forums

Wait for website to load


koden

Recommended Posts

I have a macro where I use this.

 

But I have webside that's named almost the same when it changes.

 

ex: before i hit enter it's named for ex.   test.online.com/#=

 

When I hit enter it changes to  test.online.com/#=X

 

X is a number that changes....

 

can I use a "wait for webside to load" no matter what number is in X place?

 

Hope it's to understand..

 

 

Link to comment
Share on other sites

After the web site has loaded, the macro can type ALT-d to highlight the URL.  Then copy the URL to clipboard, set a text variable from the clipboard, and check for the value of x.  Something like this:

 

REPEAT UNTIL COUNT NOT EQUAL COUNT (that is, repeat forever)

   LOAD WEBSITE

   WAIT FOR WEBSITE TO LOAD

   TYPE ALT-d (highlights the URL)

   TYPE CTRL-c (copy URL to clipboard)

   VARIABLE SET STRING URLNAME FROM CLIPBOARD

   REMOVE ALL EXCEPT LAST CHARACTER FROM URLNAME

   IF URLNAME EQUALS 1 THRU 9

   ELSE

      REPEAT EXIT

   ENDIF

END REPEAT

Link to comment
Share on other sites

  • 10 months later...

long time ago....

I did not need this function at that time.

But now I do

 

But what i need is that macro has to stop if website is not changing from 

 

test.online.com/#=

 

to any number xx 1 to 99

 

test.online.com/#=xx

 

xx is a number from 1 to 99 (actually also 100 and more. But wont happen, so 99 is fine).

 

Will it still be same code as above?

Link to comment
Share on other sites

Generally, yes, same logic.  Except you will need to extract more than just one digit from the end of the URL. 

There may well be better ways to get at the URL, but I don't know them.

I have had mixed success with WAIT FOR WEB PAGE.  I seem to recall that it is intended to work only with Internet Explorer.  I have one macro where it works very well in Firefox, but others where I have to check colors at key positions of the screen to decide whether the page has finished loading. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...