page loaded , click a buttom,wait until the result sent back

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
joe88888
Newbie
Posts: 14
Joined: Wed Nov 22, 2006 4:56 pm

page loaded , click a buttom,wait until the result sent back

Post by joe88888 » Thu Apr 26, 2007 8:55 pm

How can I set the wait until the result is sent back when I click a button on the already completely loaded page.
thank you!

I know this below will wait for the wait page to load completely, but how can I modify this to what I want

VBStart
Sub OpenPage(URL,Wait)
Dim IE
Set IE = CreateObject("InternetExplorer.Application")
IE.visible = 1
IE.navigate URL

do while IE.Busy and Wait
loop
End Sub
VBEND

VBRun>OpenPage,http://www.xxxxxxx.com

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

Post by Marcus Tettmar » Fri Apr 27, 2007 10:21 am

IE.Busy is true when IE is busy. So it works in cases where a part of the page is loading too. It is not just for when you have navigated to a new page. So you could use the IE.Busy loop after clicking your button.

Many people find it easier to use the image recognition functions. Then you can forget trying to use IE's automation interface and instead make the script watch for a part of the page to change. You could use WaitScreenImage.
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