Image Events: dimensions in decimal inches & pixels

Please I need some guidance to modified this awesome & incredible applescript (A big thanks for the author:lol:)

-The size in decimal inches which the log is reporting. I need to see only the first 4 digits. For example; 4.566 x 5.795 instead of 4.5668585400558788 x 5.7952159633470056863.

-The pixel dimensions: 600 x 400

Thank you the authors for having websites like this one;)


property Rast_CT : {missing value, "8BIM"} -- Photoshop or unknown creator types
property FileTypeList : {"JPEG", "TIFF"} -- Your Image Events file type choice
property Ext_List : {missing value, "jpg", "jpeg", "tif", "tiff"} -- Your Image Events extensions choice
--
set inputFolder to choose folder with prompt "Where's the images folder?"
--
tell application "Finder"
set MyImageFiles to (every file of entire contents of inputFolder) as alias list
end tell
--
set PS_List to {}
set IE_List to {}
--
tell application "Finder"
repeat with this_item in MyImageFiles
set x to properties of this_item
--
if name extension of this_item is "eps" or ¬
file type of this_item is "EPSF" and ¬
creator type of this_item is in Rast_CT then ¬
copy (this_item as string) to end of PS_List
--
if name extension of this_item is in Ext_List or ¬
file type of this_item is in FileTypeList and ¬
creator type of this_item is in Rast_CT then ¬
copy (this_item as string) to end of IE_List
end repeat
end tell
--
repeat with aFile in IE_List
tell application "Finder"
set TheFile to aFile as alias
set docName to name of TheFile
end tell
tell application "Image Events"
set thisImage to open TheFile
set docMode to get color space of thisImage
set docRes to get resolution of thisImage
set docDims to get dimensions of thisImage
set docWidth to (item 1 of docDims) / (item 1 of docRes)
set docHeight to (item 2 of docDims) / (item 2 of docRes)
if (item 1 of docRes) = (item 2 of docRes) then
set docRes to (item 1 of docRes)
else
set docRes to (item 1 of docRes) & tab & (item 2 of docRes)
end if
writelog(docName, docMode, docWidth, docHeight, docRes) of me
close TheFile saving no
end tell
end repeat
--
tell application "Adobe Photoshop CS4"
set display dialogs to never
set UserPrefs to properties of settings
set ruler units of settings to inch units
end tell
--
repeat with aFile in PS_List
tell application "Finder"
set TheFile to aFile as alias
end tell
tell application "Adobe Photoshop CS4"
activate
open TheFile
set docRef to the current document
tell docRef
set docName to name of docRef
set docMode to mode
set docWidth to width
set docHeight to height
set docRes to resolution
writelog(docName, docMode, docWidth, docHeight, docRes) of me
end tell
close current document without saving
end tell
end repeat
--
tell application "Adobe Photoshop CS4"
set ruler units of settings to ruler units of UserPrefs
end tell
--
set ReadFile to ((path to desktop folder) as text) & "Image Info Log.txt" as alias
tell application "TextEdit"
activate
open ReadFile
end tell
--
on writelog(docName, docMode, docWidth, docHeight, docRes)
set theLog to ((path to desktop folder) as text) & "Image Info Log.txt"
try
open for access file the theLog with write permission
write (return & docName & tab & docMode & tab & docWidth & tab & docHeight & tab & docRes) to file the theLog starting at eof
close access file the theLog
on error
try
close access file the theLog
end try
end try
end writelog

Model: iMac
AppleScript: 2.2.1
Browser: Safari 531.21.10
Operating System: Mac OS X (10.5)