Bert Posted July 2, 2007 Share Posted July 2, 2007 I'm making a script that will look at a table, and capture the data. So far I have 2 issues, and I'm addressing the first issue in a different thread. The second issue should be simple to do, but I can't figure out after reading the help file and searching the forum. I'm looking to do this:$oIE = _IE_Example ("table") $colTables = _IETableGetCollection ($oIE, 1) $n =1 $avTable = _IETableWriteToArray ($colTables) ;this writes the data that is VIEWABLE to the user. It will not collect hyperlink info $oLinks = _IELinkGetCollection ($oIE) ;This gets the hyperlinks, but doesn't say how to index them. ????? How do you get the index so you can pick?? $iNumLinks = @extended MsgBox(0, "Link Info", $iNumLinks & " links found")The above example has no hyperlinks in _IE_Example ("table"), However for sake of argument, say column 0 has a hyperlink in each cell. In this case, you would get back 5 hyperlinks. my question is this:How do I get the hyperlink I want from the table? My plan is to:reach row from the tableLook at column 0 of the row, and get the hyperlink info - This includes the seen text and the link itselfwrite the row to a HTML page, so that it will scroll in a marquee. The hyperlink will show in the scroll.I do not know how to access the index of hyperlinks. Can someone show me? Yes, I've stared at the helpfile until I'm blue in the face. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Bert Posted July 2, 2007 Author Share Posted July 2, 2007 Never mind, I figured it out. $oIE = _IECreate ("http://somewebpagehere.com", 0, 0) $oIE1 = _IECreate () $colTables = _IETableGetCollection ($oIE, 1) $n =1 $avTable = _IETableWriteToArray ($colTables) $oLinks = _IELinkGetCollection ($oIE, $e) $iNumLinks = $oLinks.href $makemarquee = _IEDOCWriteHTML($oIE1, '<body scroll=no topmargin=0 BGCOLOR=LTGREEN><marquee SCROLLAMOUNT=2 ><a href= "'&$iNumLinks&'">'& $avTable[0][$e]&'</marquee></body>') The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 2, 2007 Moderators Share Posted July 2, 2007 Is there an actual website we can test this on? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted July 2, 2007 Moderators Share Posted July 2, 2007 I would think something more like this... #include <IE.au3> $oIE1 = _IECreate() $oIE2 = _IECreate("http://www.autoitscript.com", 0, 0) $oLinks = _IELinkGetCollection($oIE2) $sText = "" For $oLink In $oLinks If String($oLink.outerText) = "0" Then ContinueLoop $sText &= '<a href= "' & $oLink.href & '">' & $oLink.outerText & "<br />" Next _IEQuit($oIE2) _IEDocWriteHTML($oIE1, '<body scroll=no topmargin=0 BGCOLOR=LTGREEN>' & _ '<marquee SCROLLAMOUNT=2 >' & $sText & '</marquee></body>') Link to comment Share on other sites More sharing options...
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