muehli Posted October 11, 2009 Share Posted October 11, 2009 halloi am searching for an command to wait untill a browser window is loaded compledly. (something like waitActiveWindow )thanks for your helpgreetingmuehli Link to comment Share on other sites More sharing options...
CounterSpell Posted October 11, 2009 Share Posted October 11, 2009 YOu can find more info on this property in your help file under _IEPropertyGet #include <IE.au3> _IEPropertyGet ( ByRef $o_object, $s_property ) Link to comment Share on other sites More sharing options...
water Posted October 11, 2009 Share Posted October 11, 2009 I think what you need is "_IELoadWait". Details/problems please see the help file. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
CounterSpell Posted October 11, 2009 Share Posted October 11, 2009 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. Link to comment Share on other sites More sharing options...
water Posted October 11, 2009 Share Posted October 11, 2009 (edited) 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 October 11, 2009 by water My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
CounterSpell Posted October 11, 2009 Share Posted October 11, 2009 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!") Link to comment Share on other sites More sharing options...
water Posted October 11, 2009 Share Posted October 11, 2009 (edited) 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 October 11, 2009 by water My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
CounterSpell Posted October 11, 2009 Share Posted October 11, 2009 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. Link to comment Share on other sites More sharing options...
water Posted October 11, 2009 Share Posted October 11, 2009 ... 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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now