Jump to content

Recommended Posts

Posted

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

  • Moderators
Posted

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?
Posted

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

Posted

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

Posted

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().

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
  • Recently Browsing   0 members

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