Sign in to follow this  
Followers 0
Ebenezer

_IELinkGetCollection returning no links

6 posts in this topic

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, Ebenezer

Func 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

Share this post


Link to post
Share on other sites



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. :D

Why ? Don't you think that that "www.runescape.com" should be between (double-)quotes ? It is just a piece of text you know ... :P

Share this post


Link to post
Share on other sites

Have you checked what that "_IECreate(...)" returns ? If I'm not mistaken that one allready returns an error. :D

Why ? Don't you think that that "www.runescape.com" should be between (double-)quotes ? It is just a piece of text you know ... :D

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 :P .

I'm getting there all right. The part after that, that's the mystery to me :)

Thanks again - any more ideas about this ?

Share this post


Link to post
Share on other sites

#4 ·  Posted (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 :P .

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(...)" :D

Edited by BitRot

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#6 ·  Posted (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 by Ebenezer

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