joeloyzaga Posted September 20, 2009 Share Posted September 20, 2009 I am getting the collection of all images on my web page (IE) and am getting 71 imagesI'd like to narrow it down to only images with outer html "<IMG onmousedown="javascript:toggleVisibility*." - which is a regular expressionThis way I get only 3 images I want to work on... the code below gives me 4 images but when I click on the first image - it expands the page so I have to re-get the collection and the expanded page still retains the 4 images but now I want to work on the 3 unexpanded ones - they contain the string above so i can get them into their own collection to work on if I can use the string in a regular expression - can anybody help please?$sMyString = "expand_btn.gif" $oImgs = _IEImgGetCollection ($oIE) $iNumImg = @extended For $oImg In $oImgs $imagealt=_IEPropertyGet($oImg, "file name") If StringInStr($oImg.nameProp, $sMyString) then _IEImgClick($oImg,$sMyString, "src",0,0) exitloop EndIf Next 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