Returns the Text inside the <body> tag of the document
#include <IE.au3>
_IEBodyReadText ( ByRef $oObject )
$oObject | Object variable of an InternetExplorer.Application, Window or Frame object |
Success: | the text included in the <body> of the document. |
Failure: | sets the @error flag to non-zero. |
@error: | 3 ($_IEStatus_InvalidDataType) - Invalid Data Type |
@extended: | Contains invalid parameter number |
This function uses the .innerText property of the document Body.
.innerText is available for nearly all DOM elements and is a fast convenient method of parsing out just the text in a document using _IEPropertyGet().
_IEBodyReadHTML, _IEBodyWriteHTML, _IEPropertyGet
; Open a browser with the basic example, read the body Text
; (the content with all HTML tags removed) and display it in a MsgBox
#include <IE.au3>
#include <MsgBoxConstants.au3>
Local $oIE = _IE_Example("basic")
Local $sText = _IEBodyReadText($oIE)
MsgBox($MB_SYSTEMMODAL, "Body Text", $sText)
_IEQuit($oIE)