Sign in to follow this  
Followers 0
nikitanova

IE Functions question

6 posts in this topic

Guys and Gals

Please help me a bit in here. I'm trying to extract information from a set of link.

The basic structure of the "a" element - <a href="LINK">TEXT</a>

I want the "TEXT" portion of the collection. Just in the following code, I've been extracting the link with the .href property. But which property gets me the Text?

#include <IE.au3>
#include <Array.au3>
$oIE = _IECreate("http://www.songs.pk/parineeta.html")
$oLinks = _IELinkGetCollection($oIE)
$iNumLinks = @extended
MsgBox(0, "Link Info", $iNumLinks & " links found")
Global $linkArray[$iNumLinks*2 + 1]
Global $count
For $oLink In $oLinks
    ;MsgBox(0, "Link Info", $oLink.href)
    If StringInStr($oLink.href, "http://link.songs.pk/song.php?songid=") Then
        $count = $count + 2
        $linkArray[$count] = $oLink.href
        $linkArray[$count+ 1] = $oLink ;<------HERE IS THE PROBLEM
    EndIf
Next

_ArrayDisplay($linkArray)

;http://www.songs.pk/indian/pocket_maar_1974.html
;http://link.songs.pk/song.php?songid=2080

Share this post


Link to post
Share on other sites



Try with .innertext ! Posted Image


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Excellent! Many thanks!

I feel like kissing you.

BTW, Do you know where I can find a list of all available properties like that?

Share this post


Link to post
Share on other sites

Excellent! Many thanks!

I feel like kissing you.

BTW, Do you know where I can find a list of all available properties like that?

Thanks !

And you can find in IE.au3 ! Posted Image


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

I see. Never thought it'd be inside there! I already had the information but didn't know where to look!

Anyway, thanks again!

Share this post


Link to post
Share on other sites

I see. Never thought it'd be inside there! I already had the information but didn't know where to look!

Anyway, thanks again!

Windows search is one of my friend !Posted Image


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

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