Jump to content

Recommended Posts

Posted

Hey,

Is it possible to check in a IE object if (title of site) = $var ? I know that you can check if it's at a certain URL with this:

If _IEPropertyGet($oIE, "locationurl") = "URL" Then

Let's take google.com as an example, the site title is Google ( - Windows Internet Exporer), could we be able to detect if the title of the IE object = "Google" ? Kind of like WinActive (but for the IE obj).

Thanks,

Kurt

Awaiting Diablo III..

Posted (edited)

How about _IEBodyReadHTML and grab the title from there?

Edit: Sorry, I mean _IEDocReadHTML.

Edited by mikehunt114
IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
Posted (edited)

Good idea,

I'll go do some tests on that ^.^ Thanks.

* EDIT: InetGetSource+StringRegExp won't work. *

Edited by _Kurt

Awaiting Diablo III..

Posted

Good idea,

I'll go do some tests on that ^.^ I also just had the idea of getting the source code with InetGetSource and checking for the title with StringRegExp. Thanks.

Great minds think alike....or something like that. ;)

IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
Posted (edited)

Another way.

#include <IE.au3>
$oIE = _IECreate ("www.google.com", 1)
$oElements = _IETagNameGetCollection($oIE,"Title")
For $oElement In $oElements
    MsgBox(0, "Title",$oElement.innerText)
Next
Edited by Joon
Posted

Why make it so hard?

#include <IE.au3>

$oIE = _IECreate("www.google.com")
ConsoleWrite($oIE.document.title & @CR)
Easy for you to say ;)

Hard way is the only way you know then you have no choice. I learned IE COM through AutoIt and that's undocumented in Help :lmao:

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