Jump to content

LinkGetCollection problem?


Damein
 Share

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
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...