Jump to content
tommytx

How to save an image that autoit finds using _IEImgGetCollection .

Recommended Posts

tommytx

The following code finds image 5 and gives me the url and image name. Is there a simple command that will save the image to hard drive.

#include <IE.au3>
$url = "http://www.vahud.com"
$oIE = _IECreate ($url)
$oImg = _IEImgGetCollection ($oIE, 5)
$sInfo = "Src: " & $oImg.src & @CR
$sInfo &= "FileName: " & $oImg.nameProp & @CR
$sInfo &= "Height: " & $oImg.height & @CR
$sInfo &= "Width: " & $oImg.width & @CR
$sInfo &= "Border: " & $oImg.border
MsgBox(0, "5th Image Info", $sInfo)

Share this post


Link to post
Share on other sites
DW1

InetGet should do what you want.

#include <IE.au3>
$url = "http://www.vahud.com"
$oIE = _IECreate ($url)
$oImg = _IEImgGetCollection ($oIE, 5)
$sInfo = "Src: " & $oImg.src & @CR
$sInfo &= "FileName: " & $oImg.nameProp & @CR
$sInfo &= "Height: " & $oImg.height & @CR
$sInfo &= "Width: " & $oImg.width & @CR
$sInfo &= "Border: " & $oImg.border
MsgBox(0, "5th Image Info", $sInfo)
InetGet($oImg.src, @DesktopDir & 'pic.gif')

Share this post


Link to post
Share on other sites
tommytx

Thanks that worked just fantastic...

Share this post


Link to post
Share on other sites
Frescard

Sorry for resurrecting this old topic, but my question is exactly the same, except I cannot use InetGet, as the images come from an authorized session (i.e. I have to login to the site first, to see those pictures). Can the image be saved directly from that collection somehow?

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

×