Sign in to follow this  
Followers 0
Gui

Counting the Number of Img's with their .src on IE?

3 posts in this topic

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?

Share this post


Link to post
Share on other sites



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

;)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

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

;)

Thanks, but already fixed that. :evil:

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