Sign in to follow this  
Followers 0
LOULOU

TITLE TAG with IE3

5 posts in this topic

How can I obtain the content of an TITLE TAG

Ex

<title>Our website is good</title>

I want to get Our website is good

$oTags = _IETagNameGetCollection($oIE, "TITLE") ;Search for all Meta tags

If @extended = 0 Then

Msgbox(0,"","Erreur"

Else

;===================================================

;On va rechercher pour le référencement des produits

For $otheTag In $oTags

$fnDesc = $otheTag.content ; get the data

$fnDesc = StringReplace($fnDesc, "Amazon.fr : ", "", 2)

$fnDesc = StringReplace($fnDesc, "'", "´")

next

Endif

With these instruction i don't arrive to anaything

Share this post


Link to post
Share on other sites



Hi,

get source and then _StringBetween.

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

How can I obtain the content of an TITLE TAG

Ex

<title>Our website is good</title>

I want to get Our website is good

With these instruction i don't arrive to anaything

Try this:

#include <IE.au3>
$oIE = _IE_Example ("basic")
$lol = _IEPropertyGet ($oIE, "title")
MsgBox(0, "Title", "Title is: "& $lol)

EDIT: Someone can't read... *rolls eyes* I see you have already got that far :)

Edited by Bert

Share this post


Link to post
Share on other sites

$oTitles = _IETagNameGetCollection($oIE, "TITLE")
For $oTitle In $oTitles
    $sTitle = $oTitle.innerText
    MsgBox(0, "Title Text", $sTitle)
Next


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]

Share this post


Link to post
Share on other sites

The <TITLE> tag drives the setting of $oIE.document.title -- even if there is somehow more than one <TITLE> tag in a document, $oIE.document.title will have only a single value and this is obtained in IE.au3 with _IEPropertyGet($oIE, "title") as Bert suggested.

mikehunt114's suggestion works as well, but if you want the definitive title (which can also be changed with _IEPropertySet regardless of the TITLE tags) use _IEPropertyGet.

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

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  
Followers 0