Sign in to follow this  
Followers 0
n0pr0bl3m

Variable must be of type object

2 posts in this topic

$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 ?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

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