J'utilise la fonction _IEBodyReadText dans un de mes script mais une erreur arrive fréquemment mais pas toujours et est assez gênante car elle arrête l'exécution de mon script.
; #FUNCTION# ====================================================================================================================
; Name...........: _IEBodyReadText
; Description ...: Returns the Text inside the <body> tag of the document
; Parameters ....: $o_object - Object variable of an InternetExplorer.Application, Window or Frame object
; Return values .: On Success - Returns the Text included in the <body> of the docuement
; On Failure - Returns 0 and sets @ERROR
; @ERROR - 0 ($_IEStatus_Success) = No Error
; - 3 ($_IEStatus_InvalidDataType) = Invalid Data Type
; @Extended - Contains invalid parameter number
; Author ........: Dale Hohm
; ===============================================================================================================================
Func _IEBodyReadText(ByRef $o_object)
If Not IsObj($o_object) Then
__IEErrorNotify("Error", "_IEBodyReadText", "$_IEStatus_InvalidDataType")
Return SetError($_IEStatus_InvalidDataType, 1, 0)
EndIf
If Not __IEIsObjType($o_object, "browserdom") Then
__IEErrorNotify("Error", "_IEBodyReadText", "$_IEStatus_InvalidObjectType", "Expected document element")
Return SetError($_IEStatus_InvalidObjectType, 1, 0)
EndIf
;
[color=#FF0000]Return SetError($_IEStatus_Success, 0, $o_object.document.body.innerText)[/color]
EndFunc ;==>_IEBodyReadText