Jump to content

Recommended Posts

Posted

Aye guys, let's say you have a webpage open. There are 20 pictures total, and some of them are pictures of trees. You don't know how many 'trees' there are, and you want to find out, and click them all. So is it possible to get the number of total images on a webpage, based on their src? This is my code for clicking all the ones with the same .src

$oLinks = _IELinkGetCollection($oIE)
    For $oLink In $oLinks
        $x = 0
        If $oLink.href = 'The images.src'  Then
            $x = $x + 1    ; That was gonna be how many have been clicked so far. Now I want to get [ out of total images... ]
            _IEImgClick($oIE,$oLink.href)
        EndIf
    Next

So how would I get the total number of that image I'm clicking?

Posted

Get "$x = 0" outside the loop. You are resetting the count to 0 on every loop.

;)

Thanks, but already fixed that. :evil:

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
×
×
  • Create New...