Sign in to follow this  
Followers 0
Ic3c0ld

Copying Link Array From IE.au3

5 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Thank you very much that works perfectly. There wouldn't happen to be a function that detects if a string is all uppercase.

Edited by Ic3c0ld

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