Yvan good morning.
Your script makes an error.
Can’t get file “Seva Server:Users:ganesh:Desktop:3_20200525_101434_800.jpg” of application “Image Events”.
The log said:
tell application “Script Editor”
choose file of type {“public.jpeg”} with multiple selections allowed
→ {alias “Seva Server:Users:ganesh:Desktop:3.jpg”}
end tell
tell application “Image Events”
launch
end tell
tell current application
info for alias “Seva Server:Users:ganesh:Desktop:3.jpg”
→ {name:“3.jpg”, creation date:date “Monday, 25 May 2020 at 09:15:20”, modification date:date “Monday, 25 May 2020 at 09:15:20”, size:2218263, folder:false, alias:false, package folder:false, visible:true, extension hidden:false, name extension:“jpg”, displayed name:“3.jpg”, default application:alias “Seva Server:System:Applications:Preview.app:”, kind:“JPEG image”, file type:“file creator:“type identifier:“public.jpeg”, locked:false, busy status:false, short version:””, long version:“”}
end tell
tell application “Image Events”
open file “Seva Server:Users:ganesh:Desktop:3.jpg”
→ image “3.jpg”
end tell
tell current application
info for alias “Seva Server:Users:ganesh:Desktop:3.jpg”
→ {name:“3.jpg”, creation date:date “Monday, 25 May 2020 at 09:15:20”, modification date:date “Monday, 25 May 2020 at 09:15:20”, size:2218263, folder:false, alias:false, package folder:false, visible:true, extension hidden:false, name extension:“jpg”, displayed name:“3.jpg”, default application:alias “Seva Server:System:Applications:Preview.app:”, kind:“JPEG image”, file type:“file creator:“type identifier:“public.jpeg”, locked:false, busy status:false, short version:””, long version:“”}
current date
→ date “Monday, 25 May 2020 at 10:15:18”
end tell
tell application “Image Events”
get dimensions of image “3.jpg”
→ {}
get resolution of image “3.jpg”
→ {}
scale image “3.jpg” to size 800
save image “3.jpg” in “Seva Server:Users:ganesh:Desktop:3_20200525_101518_800.jpg” with icon
→ missing value
close image “3.jpg”
open file “Seva Server:Users:ganesh:Desktop:3_20200525_101518_800.jpg”
→ error number -1728 from file “Seva Server:Users:ganesh:Desktop:3_20200525_101518_800.jpg”
Result:
error “Image Events got an error: Can’t get file "Seva Server:Users:ganesh:Desktop:3_20200525_101518_800.jpg".” number -1728 from file “Seva Server:Users:ganesh:Desktop:3_20200525_101518_800.jpg”
PS I am testing presently on a different 10.15 machine.