toxicdav3 Posted April 12, 2008 Share Posted April 12, 2008 Hey, i need help getting links that are created with javascript. The current code i'm using is pretty much the example given from the help file. I guess it only reads the html. Any help would be appreciated!#include <IE.au3>$oIE = _IECreate ("http://example.com")$oLinks = _IELinkGetCollection ($oIE)$iNumLinks = @extendedMsgBox(0, "Link Info", $iNumLinks & " links found")For $oLink In $oLinks MsgBox(0, "Link Info", $oLink.href)Next Layered Networks - Hosting Solutions Link to comment Share on other sites More sharing options...
DaleHohm Posted April 12, 2008 Share Posted April 12, 2008 If they aren't html, they aren't links. Javasctipt can create them dynamically. Suggest you try DebugBar. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
toxicdav3 Posted April 14, 2008 Author Share Posted April 14, 2008 sure there isn't a way?! DebugBar ain't going to help with my script Layered Networks - Hosting Solutions Link to comment Share on other sites More sharing options...
DaleHohm Posted April 14, 2008 Share Posted April 14, 2008 You don't understand what you are asking well enough to understand DebugBar or the answer I gave. Prove me wrong and I'll be happy to help further. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
toxicdav3 Posted April 16, 2008 Author Share Posted April 16, 2008 (edited) I do understand though. I need a way of getting links from a page that has been processed by the browser, but i do not have a way atm or know how to do it. Autoit only gets the original source when interacting with IE. Even though DebugBar is able to do this, it is no help to me as i can't implement it into my code as far as i know. Edited April 16, 2008 by toxicdav3 Layered Networks - Hosting Solutions Link to comment Share on other sites More sharing options...
Will66 Posted April 16, 2008 Share Posted April 16, 2008 Autoit only gets the original source when interacting with IE.Not true, the DOM is always available Link to comment Share on other sites More sharing options...
Neo Posted May 16, 2008 Share Posted May 16, 2008 toxicdav3, I don't think you should question Master Dale Hohm, he created the IE.au3 that we all use and love to use. It could be that before you do an _IELinkGetCollection($oFrameBody) on your page, you need to get to the correct Frame as if you page uses frames you might not be able to obtain the links you want. Let us know if you need more help. Link to comment Share on other sites More sharing options...
metalicaman8 Posted May 16, 2008 Share Posted May 16, 2008 http://www.mjtnet.com/software/imglib104.exeThis installer includes easy to read examples in a language I'm not familiar with but could understand enough to use the included dll. It can take a screenshot of an area you define (the link you want to click) find that picture inside your screen and click the middle of that area. It includes a program to take the screenshots. It is an installer. [center]Take the Magic: The Gathering 'What Color Are You?' Quiz.[/center] Link to comment Share on other sites More sharing options...
GEOSoft Posted May 16, 2008 Share Posted May 16, 2008 You will have to look at the page source and see just where the javascript links are. If they are being created in the <Head> tag then I think there is a function to get the inner-text of the head section of the page. Else you will have to parse the source code to get them. If they are in an external js file then it will be trickier. You will have to get the link to the js file, then use InetGet() and parse that file. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" 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