Ic3c0ld Posted April 23, 2007 Posted April 23, 2007 (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 April 23, 2007 by Ic3c0ld
Moderators big_daddy Posted April 23, 2007 Moderators Posted April 23, 2007 #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)
Ic3c0ld Posted April 23, 2007 Author Posted April 23, 2007 #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 . 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.
Moderators big_daddy Posted April 23, 2007 Moderators Posted April 23, 2007 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)
Ic3c0ld Posted April 23, 2007 Author Posted April 23, 2007 (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 April 23, 2007 by Ic3c0ld
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now