Sign in to follow this  
Followers 0
tommytx

How to break out the class in DOM using autoit?

2 posts in this topic

#1 ·  Posted (edited)

Using the DOM stuff and need to pull out the innerTEXT of the class="sr tum"

Here is what I am using so far with negative results.. I don't see a command for _IEGetObjByClass but that is what it looks like I need. Can anyone push me in the right direction to get back on track...

Local $oDiv = _IEGetObjByName($oIE, "sr tum")
Local $oJob = _IEPropertyGet($oDiv, "innertext")
ConsoleWrite($oJob & @CRLF) ; Ans should be: [url="http://www.vahud.com"]www.vahud.com[/url]

<a id="rss1" onmouseup="return href="[url="http://www.vahud.com/"]http://www.vahud.com/[/url]">
</h3>
<div class="rss1" aria-label="Result today" role="button" tabindex="0">
<div>
<div class="sr tum">
<cite>www.vahud.com/</cite>
</div>
Edited by tommytx

Share this post


Link to post
Share on other sites



tommytx,

You can figure it out from this...

Local $odivs = _IETagnameGetCollection($o_htmlfile, 'DIV')
    if not isobj($odivs) then return seterror(-2)

    for $odiv in $odivs
        ConsoleWrite('!----  ' & 'id = ' & $odiv.id  & ' classname= ' & $odiv.classname  &  ' title = ' & $odiv.title & @LF)
        if $odiv.classname = 'mod-content' then ConsoleWrite($odiv.innertext & @LF)
    next

kylomas


Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

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