Jump to content
Sign in to follow this  
muehli

serching command

Recommended Posts

muehli

hallo

i am searching for an command to wait untill a browser window is loaded compledly. (something like waitActiveWindow )

thanks for your help

greeting

muehli

Share this post


Link to post
Share on other sites
CounterSpell

YOu can find more info on this property in your help file under _IEPropertyGet

#include <IE.au3> 
_IEPropertyGet ( ByRef $o_object, $s_property )

Share this post


Link to post
Share on other sites
water

I think what you need is "_IELoadWait". Details/problems please see the help file.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
CounterSpell

Both of these would work, but:

_IELoadWait : uses a set time so if internet hits a slower point it will mess up the script

_IEPropertyGet : Should be able to check busy according to help file. So even if your internet is going really slow it will wait.

Share this post


Link to post
Share on other sites
water

So this code should make sure that the page has been loaded completely?

If _IEPropertyget($oIE,"readystate") = 4 Then MsgBox(0,"","Page loaded!")

For the return values of "readystate" please see here.

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
CounterSpell

Ive never thought of using it that way but as far as i can tell that should work i was thinking something more like

While _IEPropertyget($oIE,"busy") <> 1 ;I Maybe wrong on the 1 but I think 1 means finished
Wend
MsgBox(0,"","Page loaded!")

Share this post


Link to post
Share on other sites
water

According to MS "busy" returns TRUE and FALSE resp. 1 and 0. So I think it should be:

While _IEPropertyget($oIE,"busy") = 1
  Sleep(250)
Wend
MsgBox(0,"","Page loaded!")
Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
CounterSpell

Yaah, thanks for correcting that. I always get the true false confused. but one minor note here you may want to check for redirect first... I just realized some website use redirects during page loads you would never even see it happen and it would come back for a second as page complete. So if you dont know i would add it in too but i dont know the exact code for that I just know it exists.

Share this post


Link to post
Share on other sites
water

... but one minor note here you may want to check for redirect first... I just realized some website use redirects during page loads you would never even see it happen and it would come back for a second as page complete. So if you dont know i would add it in too but i dont know the exact code for that I just know it exists.

There was some discussion about this problem a few weeks ago and IIRC the solution was not to check for busy but to check for the existance of a page element that gets loaded as one of the last things on the page. But I got the impression that waiting for redirected pages can become a bit tricky :)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×