Jump to content

Html Pages ?


 Share

Recommended Posts

I've been able to strip out the code and view the text:

Func StripCode ( $sText )

local $sOutput = ""

$sText = StringReplace ( $sText, "<", chr(230) & chr(231) )

$sText = StringReplace ( $sText, ">", chr(230) )

local $sLines = StringSplit ( $sText, chr(230) )

For $sz = 1 to $sLines[0]

If NOT StringInStr ( $sLines[$sz], chr(231) ) then

If $sOutput <> "" then $sOutput = $sOutput & chr(13)

$sOutput = $sOutput & $sLines[$sz]

EndIf

Next ;$sz

return $sOutput

EndFunc

Link to comment
Share on other sites

If the webpage is on your computer, simply do Run ('notepad.exe file.html') to view the source.

If the webpage is on the internet, you can use IE.au3 to work with it:

$IEobj = _IECreate(1)

_IENavigate ($IEobj, "url", 1)

$Html = _IEBodyReadHtml ($IEobj)

MsgBox (0, "page source", $Html)

... or you can use _INetGetSource ("url") (must include <inet.au3>)

To download a webpage from the internet, use InetGet().

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...