Sign in to follow this  
Followers 0
Rauto

Html Pages ?

6 posts in this topic

hey y'all

is it possible to open an html page from my hard drive in a GUI window ???

thanks for AutoIt - it is the greatest

Share this post


Link to post
Share on other sites



hey y'all

is it possible to open an html page from my hard drive in a GUI window ???

thanks for AutoIt - it is the greatest

Are you wanting it to open like it would on the web, or as source?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Anybody know how to download an HTML directly off the web?

Share this post


Link to post
Share on other sites

re the html page - to open as source - many thanks - rob

hey y'all

is it possible to open an html page from my hard drive in a GUI window ???

thanks for AutoIt - it is the greatest

Share this post


Link to post
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().

Share this post


Link to post
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
Sign in to follow this  
Followers 0