lyx Posted April 9, 2008 Share Posted April 9, 2008 Hi I'm trying to check if an image exists on the current page I've got; $img = _IEImgGetCollection($oIE) But I don't know what to do from here Any help appreciated ThNx Link to comment Share on other sites More sharing options...
jvanegmond Posted April 9, 2008 Share Posted April 9, 2008 (edited) #include <IE.au3> $oIE = _IECreate ("http://www.autoitscript.com/") $sImgToLookFor = "hi.jpg" ; Fill this in with whatever you're looking for $bImgIsThere = False $oImgs = _IEImgGetCollection ($oIE) For $oImg In $oImgs If $oImg.src = $sImgToLookFor Then ; or to use a partial string: If StringInStr($oImg.src,$sImgToLookFor) Then $bImgIsThere = True ExitLoop EndIf Next If $bImgIsThere Then MsgBox(0,"","The image has been found on the page") EndIf Edited April 9, 2008 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
lyx Posted April 9, 2008 Author Share Posted April 9, 2008 Thnx... but it didn't work, BLEH the image only appears after 30 secs (GUESS WHICH WEBSITE ) Link to comment Share on other sites More sharing options...
lyx Posted April 9, 2008 Author Share Posted April 9, 2008 . 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