Jump to content

Copying Link Array From IE.au3


Recommended Posts

Hey, didn't think I would ever use AutoIT again, but I guess I was wrong. Anyway I am using Dales IE.au3 to try grab all the links from a page. I need to recursively loop through them. And doing a GetCollection repeatedly isn't an option. The problem is if i do something like.

$oIE = _IECreate("http://overtherainbow.com/index.html",0,0)
$oLinks = _IELinkGetCollection($oIE)

$NewArray = ""
for $oLinks in $oLinks
    StringReplace($oLinks.href,"%20"," ")
Next

for $oLinks in $oLinks
    ConsoleWrite($oLinks.href) <-- the href isn't doesn't write nor is it updated with spaces instead of "%20's"
Next

_IEQuit($oIE)

I also tried storing the $oLinks.href in a string array with _AddArray() but that didn't work either. Can anyone give me a solution to this predicament.

Edited by Ic3c0ld
Link to comment
Share on other sites

#include <IE.au3>

_IEErrorHandlerRegister()

$oIE = _IECreate("http://SomeWhereLessQueer.com", 0, 1)
$oLinks = _IELinkGetCollection($oIE)

For $oLink In $oLinks
    StringReplace($oLink.href, "%20", " ")
    ConsoleWrite($oLink.href & @CR)
Next

_IEQuit($oIE)
LOL I didn't realize that was a real website. I just typed in a new one. Wouldn't have guessed it was a gay lesbian site :shocked:. Also that code doesn't work for me either. What i am trying to achieve is to make AutoIT generate a C++ namespace class for me based on the contents of a website.
Link to comment
Share on other sites

  • Moderators

I got in too much of a hurry. If this isn't what you are wanting then you will need to more throughly explain yourself.

#include <IE.au3>

_IEErrorHandlerRegister()

$oIE = _IECreate("http://SomeWhereLessQueer.com", 0, 0)
$oLinks = _IELinkGetCollection($oIE)

For $oLink In $oLinks
    $sTmp = StringReplace($oLink.href, "%20", " ")
    ConsoleWrite($sTmp & @CR)
Next

_IEQuit($oIE)
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...