narayanjr Posted August 27, 2007 Share Posted August 27, 2007 #include <IE.au3> $oIE = _IECreate ("http://www.autoitscript.com/") $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 & @CR ;$sInfo &= "Size: " & $oImg.size MsgBox(0, "4th Image Info", $sInfo) is there any way to make the commented line work? I just made the line up I didnt think that it would but is there a way to make it get the size of the image also? Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted August 27, 2007 Moderators Share Posted August 27, 2007 Try changing the line to this... $sInfo &= "Size: " & InetGetSize($oImg.src) Link to comment Share on other sites More sharing options...
narayanjr Posted August 27, 2007 Author Share Posted August 27, 2007 that worked sadly it is slow but its good enough for now unless some one knows another way Thanks big Link to comment Share on other sites More sharing options...
weaponx Posted August 27, 2007 Share Posted August 27, 2007 I tried this: #include $oIE = _IECreate ("http://www.autoitscript.com/") $oImg = _IEImgGetCollection ($oIE, 1) $sInfo = "Src: " & $oImg.src & @CR $sInfo &= "FileName: " & $oImg.nameProp & @CR $sInfo &= "Height: " & $oImg.height & @CR $sInfo &= "Width: " & $oImg.width & @CR $sInfo &= "Border: " & $oImg.border & @CR $sInfo &= "Size: " & (FileGetSize ( @UserProfileDir & "\Local Settings\Temporary Internet Files\" & $oImg.nameProp ) / 1024) & " kb" MsgBox(0, "4th Image Info", $sInfo) But it loooks like windows is blocking reading from that folder. Link to comment Share on other sites More sharing options...
weaponx Posted August 27, 2007 Share Posted August 27, 2007 Here you go (found the properties here:http://www.javascriptkit.com/jsref/image.shtml): #include "IE.au3" $oIE = _IECreate ("http://www.autoitscript.com/") $oImg = _IEImgGetCollection ($oIE, 1) $sInfo = "Src: " & $oImg.src & @CR $sInfo &= "FileName: " & $oImg.nameProp & @CR $sInfo &= "Height: " & $oImg.height & @CR $sInfo &= "Width: " & $oImg.width & @CR $sInfo &= "Border: " & $oImg.border & @CR $sInfo &= "Size: " & StringFormat("%.2f", $oImg.fileSize / 1024) & " kb" MsgBox(0, "4th Image Info", $sInfo) Link to comment Share on other sites More sharing options...
narayanjr Posted August 27, 2007 Author Share Posted August 27, 2007 Thanks weaponx works great and its fast. 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