_Kurt Posted December 6, 2006 Posted December 6, 2006 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" ThenLet'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..
mikehunt114 Posted December 6, 2006 Posted December 6, 2006 (edited) How about _IEBodyReadHTML and grab the title from there?Edit: Sorry, I mean _IEDocReadHTML. Edited December 6, 2006 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]
_Kurt Posted December 6, 2006 Author Posted December 6, 2006 (edited) Good idea, I'll go do some tests on that ^.^ Thanks. * EDIT: InetGetSource+StringRegExp won't work. * Edited December 6, 2006 by _Kurt Awaiting Diablo III..
mikehunt114 Posted December 6, 2006 Posted December 6, 2006 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]
Joon Posted December 6, 2006 Posted December 6, 2006 (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 December 6, 2006 by Joon
Moderators big_daddy Posted December 7, 2006 Moderators Posted December 7, 2006 Why make it so hard? #include <IE.au3> $oIE = _IECreate("www.google.com") ConsoleWrite($oIE.document.title & @CR)
mikehunt114 Posted December 7, 2006 Posted December 7, 2006 *has yet to learn the majority of IE COM* 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]
Joon Posted December 7, 2006 Posted December 7, 2006 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now