Jump to content

Variable must be of type object


Recommended Posts

$links = _IELinkGetCollection($IE)
$num = @extended
For $v = 1 To $num Step 1
$link = _IELinkGetCollection($IE, $v)
If $v > 10 And $link.href = "#" Then
_IELinkClickByIndex($IE, $v)
EndIf
Next

I get this error:

(177): ==> Variable must be of type "Object".:

If $v > 10 And $link.href = "http://www.sofiawars.com/alley/search/type/#" Then

If $v > 10 And $link^ ERROR

Line 177:

If $v > 10 And $link.href = "#" Then

Is it possible to fix it ?

Link to comment
Share on other sites

I fixed it by adding this line of code

$num = $num -1

after the

$num = @extended

because it returns the number of links + 1.

I checked this with a loop displaying each link in MsgBox with its index and href it showed 51 of 52 as a last link.

Edited by n0pr0bl3m
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...