Jump to content

IE check if image exist


 Share

Recommended Posts

#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 by Manadar
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...