Sign in to follow this  
Followers 0
Damein

LinkGetCollection problem?

4 posts in this topic

I'm not understanding why this isn't working:

#include <IE.au3>
$oIE = _IECreate ("http://www.google.com")
$oLinks = _IELinkGetCollection ($oIE)
$iNumLinks = @extended
MsgBox(0, "Link Info", $iNumLinks & " links found")
For $oLink In $oLinks
    MsgBox(0, "Link Info", $oLink.href)
Next

All I did to the example is change:

$oIE = _IE_Example ("basic")

To:

$oIE = _IECreate ("http://www.google.com")

And it doesn't seem to work anymore :/

Also, for some reason it opens a blank IE window as well as the Google one.


MCR.jpg?t=1286371579

Most recent sig. I made

Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic

Share this post


Link to post
Share on other sites



I ran the same code and it works for me. It only opens one instance of Internet Explorer. A message box pops up saying Google has 42 links then proceeds to display one link each time I press "OK".

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

That's odd.. it comes up as a 1 for me, creating two windows and they shuts down due to:

For $oLink In $oLinks
    MsgBox(0, "Link Info", $oLink.href)
Next

Needing an "object"

Weird... anyone have any ideas?

*** EDIT ***

I compiled the script and ran as admin and it worked :/

That's lame that I must do that! ;)

Edited by Damein

MCR.jpg?t=1286371579

Most recent sig. I made

Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Maybe adding _IELoadWait ($oIE) to your code may help? Couldn't hurt to try

#include <IE.au3>$oIE = _IECreate ("http://www.google.com")_IELoadWait ($oIE)$oLinks = _IELinkGetCollection ($oIE)$iNumLinks = @extendedMsgBox(0, "Link Info", $iNumLinks & " links found")For $oLink In $oLinks    MsgBox(0, "Link Info", $oLink.href)Next

Edit: Noticed your edit. Disregard my post.

Edited by harmor

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