Jump to content

Ie Link Array?


Recommended Posts

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!

Link to comment
Share on other sites

  • Moderators

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")
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...