Jump to content

Grab <TITLE> from html page?


daddyt
 Share

Recommended Posts

Hi, I'm opening up a browser window just fine at the moment, but I'm grabbing the text from the <TITLE> ... </TITLE> tags by reading the html and manipulating the strings...

Is there any easier way by accessing the DOM?

Thanks in advance :)

Code I'm currently using looks like this:

Func getTitle($appwindow)
    local $HTML = _IEDocReadHTML($appwindow)
    $HTML = stringlower($HTML)
    
    local $i = stringinstr($HTML,"<title>")
    $HTML = StringMid($HTML,$i+7)
    
    $i = stringinstr($HTML,"</title>")
    $HTML = Stringleft($HTML,$i-1)
    
    return $HTML
endfunc
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...