Sign in to follow this  
Followers 0
jjj

Ie Link Array?

4 posts in this topic

can anyone help me set an array with all links on the page? I am trying to populate the array with this code:

_IENavigate ($oIE, "http://www.comedycentral.com/sitewide/media_player/browseresults.jhtml?showId=934")
$olinks = _IELinkGetCollection ( $oIE  )
For $Link In $oLinks
    _ArrayAdd ( $links, $Link.href )
   
Next

and then navigate to a selected link with this line:

_IENavigate ($oIE, $link[$selection])

Thanks in advance!

Share this post


Link to post
Share on other sites



can anyone help me set an array with all links on the page? I am trying to populate the array with this code:

_IENavigate ($oIE, "http://www.comedycentral.com/sitewide/media_player/browseresults.jhtml?showId=934")
$olinks = _IELinkGetCollection ( $oIE  )
For $Link In $oLinks
    _ArrayAdd ( $links, $Link.href )
   
Next

and then navigate to a selected link with this line:

_IENavigate ($oIE, $link[$selection])

Thanks in advance!

This works:

#include <IE.au3>
#include <Array.au3>

$aLinks = _ArrayCreate("")

$oIE = _IECreate ("http://www.google.com")
$oLinks = _IELinkGetCollection ($oIE)
For $oLink In $oLinks
    _ArrayAdd($aLinks, $oLink.href)
Next

$aLinks[0] = UBound($aLinks) - 1
_ArrayDisplay($aLinks, "Links")

Share this post


Link to post
Share on other sites

thanks! works perfectly...

Share this post


Link to post
Share on other sites

thanks! works perfectly...

No problem, glad I could help.

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