Jump to content
Sign in to follow this  

Grab <TITLE> from html page?

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

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  

  • Create New...