Ebenezer Posted September 19, 2006 Share Posted September 19, 2006 Hi everyone!I recently tried getting a list of links on the main page of Runescape. However, no matter what I do, the _IELinkGetCollection function returns 0. There are no errors either.Since there are tons of links there (although they seem to have no title tag) I'm a bit stumped. Could someone enlighten me? Thanks, EbenezerFunc Clicklink() $o_IE = _IECreate(www.runescape.com, 0, 1, 1, 1) Sleep(100) $vLink = _IELinkGetCollection($o_IE, -1) MsgBox(0, "Links", @error & " --- " & @extended) _IELinkClickByIndex ($o_IE, 1, 1) Exit EndFunc Link to comment Share on other sites More sharing options...
BitRot Posted September 19, 2006 Share Posted September 19, 2006 I'm a bit stumped. Could someone enlighten me? Have you checked what that "_IECreate(...)" returns ? If I'm not mistaken that one allready returns an error. Why ? Don't you think that that "www.runescape.com" should be between (double-)quotes ? It is just a piece of text you know ... Link to comment Share on other sites More sharing options...
Ebenezer Posted September 19, 2006 Author Share Posted September 19, 2006 Have you checked what that "_IECreate(...)" returns ? If I'm not mistaken that one allready returns an error. Why ? Don't you think that that "www.runescape.com" should be between (double-)quotes ? It is just a piece of text you know ... Thanks, but that's not the error. This one crept in, when I cut out the function and replaced the global vars with values to make for a shorter codeblock . I'm getting there all right. The part after that, that's the mystery to me Thanks again - any more ideas about this ? Link to comment Share on other sites More sharing options...
BitRot Posted September 19, 2006 Share Posted September 19, 2006 (edited) Thanks, but that's not the error. This one crept in, when I cut out the function and replaced the global vars with values to make for a shorter codeblock .I see ... I'm getting there all right. The part after that, that's the mystery to me Thanks again - any more ideas about this ?Yep, I do. What you have here is an old obsfucation-trick : you think you are at the Runescape-page, but actually all you see comes from somewhere else. What they have done is that they have used a single-frame link-thru to the actual page (see "_IEFrameGetCollection(...)"), which points, in this case, to : http://www.runescape.com/lang/en/aff/runescape/title.ws. [edit] Allso take a look at "_IEIsFrameSet(...)" Edited September 19, 2006 by BitRot Link to comment Share on other sites More sharing options...
DaleHohm Posted September 19, 2006 Share Posted September 19, 2006 Allso take a look at "_IEIsFrameSet(...)" Correct, View Source and you will see that the page is a frameset with one frame: <frame src="http://www.runescape.com/lang/en/aff/runescape/title.ws" noresize scrolling="auto"> The frame has no name, so get a reference to it with: $oFrame = _IEFrameGetCollection($oIE, 0) (see the docs) 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...
Ebenezer Posted September 21, 2006 Author Share Posted September 21, 2006 (edited) Correct, View Source and you will see that the page is a frameset with one frame: The frame has no name, so get a reference to it with: $oFrame = _IEFrameGetCollection($oIE, 0) (see the docs) Dale This page will drive me crazy - several layers of nested iframes with a flash button at the end . Thanks to all of you. At least now I know where to start looking. Ebenezer Edited September 21, 2006 by Ebenezer 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