AutoIt
AutoIt
Convert HTML to Plain Text
Demonstrates how to convert HTML to plain text.Chilkat AutoIt Downloads
; This example requires the Chilkat API to have been previously unlocked.
; See Global Unlock Sample for sample code.
$oH2t = ObjCreate("Chilkat.HtmlToText")
Local $sHtml = $oH2t.ReadFileToString("c:/temp/test.html","utf-8")
If ($oH2t.LastMethodSuccess = False) Then
ConsoleWrite($oH2t.LastErrorText & @CRLF)
Exit
EndIf
Local $sPlainText = $oH2t.ToText($sHtml)
If ($oH2t.LastMethodSuccess = False) Then
ConsoleWrite($oH2t.LastErrorText & @CRLF)
Exit
EndIf
ConsoleWrite($sPlainText & @CRLF)