EgoArmee Posted June 22, 2012 Share Posted June 22, 2012 Hello Community I've got the task to measure the loadtimes of our Intranetpages and need a programm for that. After a bit of searching I landed in an german Autoit forum, made a Thread and got the following script expandcollapse popupConst $runs = 1 Const $url = "www.lima-city.de/" #include _IEErrorHandlerRegister() $oIE = _IECreate("about:blank", 1, 1, 1, 1) Sleep(1000) If Not _IEPropertyGet ($oIE, "statusbar") Then _IEPropertySet ($oIE, "statusbar", True) $SinkObject = ObjEvent($oIE, "IEEvent_", "DWebBrowserEvents2") ; Ereignisse den UDFs zuweisen, beginnend mit IEEvent_$sum = 0 $sum = 0 $percent = 0 For $i = 1 To $runs $time = TimerInit() _IENavigate($oIE, $url, 0) ;wartet nicht $bLoaded = False $bStarted = False $percent = 0 $oldPer = 999 $sOldText ='' Do Sleep(100) $sText = _IEPropertyGet($oIE, "statustext") if $sText <> $sOldText Then ConsoleWrite($sText & @CRLF) $sOldText = $sText If StringInStr($sText, "auf") Then $bStarted = True If $bStarted Then If StringInStr($sText, "Fertig") Then $bLoaded = True Sleep(100) $sText = _IEPropertyGet($oIE, "statustext") ;ConsoleWrite("2 " & $sText & @CRLF) If StringInStr($sText, "wird") Then $bLoaded = False EndIf Until $bLoaded $sum += TimerDiff($time) Next MsgBox(0, "Durchschnittliche Ladezeit", "Durchschnittliche Ladezeit (" & $runs & " Läufe): " & StringFormat("%.2f", $sum / $runs / 1000) & " Sekunden") Func IEEvent_ProgressChange($Progress, $ProgressMax) $percent = Int(($Progress * 100) / $ProgressMax) EndFunc ;==>IEEvent_ProgressChange The problem is that it seems to be only working in IE8 and I need it for IE9. If you have a completly different script that also measures loadtime of Intranetsites you are welcome to post it please. Link to comment Share on other sites More sharing options...
JohnOne Posted June 22, 2012 Share Posted June 22, 2012 "It doesn't work" type posts, are not really received with applause here on the forum.I suggest you add some details of errors, and/or failures of your script hand out ifyou would like allow people to make suggestions. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
water Posted June 22, 2012 Share Posted June 22, 2012 What do the guys on the german forum say about the problem with IE9? 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...
EgoArmee Posted June 22, 2012 Author Share Posted June 22, 2012 Oh i actually thought it was a common problemSome part of the script asks for the status of a status bar which doesnt EXIST in IE9It produces that error in the console"C:UsersmagifloDesktopAutoItStuffSciTe..autoit3.exe" /ErrorStdOut "C:UsersmagifloDesktopLT_v3_Intranet.au3"--> IE.au3 V2.4-0 Warning from function _IEAttach, $_IEStatus_NoMatchhttp://www.lima-city.de/--> COM Error Encountered in LT_v3_Intranet.au3----> $IEComErrorScriptline = 2752----> $IEComErrorNumberHex = 80020009----> $IEComErrorNumber = -2147352567----> $IEComErrorWinDescription = Unbekannter Fehler----> $IEComErrorDescription = ----> $IEComErrorSource = ----> $IEComErrorHelpFile = ----> $IEComErrorHelpContext = 0----> $IEComErrorLastDllError = 0--> IE.au3 V2.4-0 Error from function _IEPropertyGet, $_IEStatus_InvalidObjectType--> IE.au3 V2.4-0 Error from function _IEPropertyGet, $_IEStatus_InvalidObjectType--> IE.au3 V2.4-0 Error from function _IEPropertyGet, $_IEStatus_InvalidObjectType.....--> IE.au3 V2.4-0 Error from function _IEPropertyGet, $_IEStatus_InvalidObjectType--> IE.au3 V2.4-0 Error from function _IEPropertyGet, $_IEStatus_InvalidObjectType>Exit code: 0 Time: 58.532 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