Gui Posted December 9, 2009 Share Posted December 9, 2009 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? Link to comment Share on other sites More sharing options...
PsaltyDS Posted December 9, 2009 Share Posted December 9, 2009 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 Link to comment Share on other sites More sharing options...
Gui Posted December 9, 2009 Author Share Posted December 9, 2009 Get "$x = 0" outside the loop. You are resetting the count to 0 on every loop. Thanks, but already fixed that. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now