Jump to content
Sign in to follow this  

Download web images and diff with a local image

Recommended Posts


I am exploring AutoIT for use with Tivoli Monitoring.

I need to analyze the pages images and confirm that they have not changed.

I have thought of a few ways to do this but I was hoping someone might have a suggested solution.

Right now I am trying to figure out how to find the image file in cache or download it to a known directory. Then I can compare it to a locally stored copy.

Edited by hammy

Share this post

Link to post
Share on other sites

Ok I found this code in the IE.au3 thread

#include <IE.au3>

$sImgDir = "c:\foo\"; Please make certain this folder already exists (silent failure if not)
$sWebPage = "http://www.autoitscript.com/forum/index.php?"; webpage with images

$oIE = _IECreate()
_IENavigate($oIE, $sWebPage)
$oIMGs = _IETagNameGetCollection($oIE.document, "img")

; Loop through all IMG tags and save file to local directory using INetGet
For $oIMG in $oIMGs
    $sImgUrl = $oIMG.src
    $sImgFileName = $oIMG.nameProp
    INetGet($sImgUrl,  $sImgDir & $sImgFileName)

IE.au3 Thread

Now I just need to figure out how to call the DOS comp command or call a commandline diff program.

Share this post

Link to post
Share on other sites

by different i dont understand what you want to find out thats different i guess a fileread ;)

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.