Jump to content

Recommended Posts

Posted

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

Const $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.

Posted

What do the guys on the german forum say about the problem with IE9?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

Oh i actually thought it was a common problem

Some part of the script asks for the status of a status bar which doesnt EXIST in IE9

It 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_NoMatch

http://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

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
×
×
  • Create New...