break on
If instr(@PRODUCTTYPE,'7') or instr(@PRODUCTTYPE,'2008') or instr(@PRODUCTTYPE,'8.1') or instr(@PRODUCTTYPE,'2012')
Dim $,$Files,$F,$W,$H,$FQFN,$attribute
$Files=split("testimage.gif,testimage.png,testimage.jpg",',')
For each $F in $Files
$FQFN='\\imagepath\'+$F
? @crlf+$FQFN
$attribute='Bit depth'
? 'Bit D ='+GetExtFileProperties($FQFN, $attribute)
$attribute='Horizontal resolution'
? 'H DPI ='+GetExtFileProperties($FQFN, $attribute)
$attribute='Width'
? 'Width ='+GetExtFileProperties($FQFN, $attribute)
$attribute='Vertical resolution'
? 'V DPI ='+GetExtFileProperties($FQFN, $attribute)
$attribute='Height'
? 'Height='+GetExtFileProperties($FQFN, $attribute)
Next
Else
? @PRODUCTTYPE+' Not Supported'
EndIf
? @crlf+'Press a key'
get $
function GetExtFileProperties($FQFN, $attribute)
dim $objShell, $objFolder,$i,$found,$s,$c
if exist($FQFN)
$objShell=CreateObject("Shell.Application")
$objFolder=$objShell.Namespace(left($FQFN,instrrev($FQFN,"\")))
if $objFolder
if vartypename($attribute)="string"
While $i<298 and $found=0
if $attribute=$objFolder.GetDetailsOf($objFolder.Items, $i)
$attribute=$i
$found=1
endif
$i=$i+1
loop
endif
if vartypename($attribute)="long" ; Number
$GetExtFileProperties=$objFolder.GetDetailsOf($objFolder.ParseName(right($FQFN,len($FQFN)-instrrev($FQFN,"\"))),$attribute)
else
exit -1
endif
else
exit @error
endif
else
exit 2
endif
; Returns a string with 123 dpi or 234 pixels so strip out to just the numeric values.
$i=$GetExtFileProperties
If $i<>''
$GetExtFileProperties=''
For $c=1 to len($i)
$s=asc(substr($i,$c,1))
If $s >47 and $s <58 or $s=46;Extract numerical values only
$GetExtFileProperties=$GetExtFileProperties+chr($s)
EndIf
Next
EndIf
endfunction