Simple script that always works . Now not. Error out on the save line. The image on the other hand has been compressed and is in the Temp Folder
error “Image Events got an error: Can’t get image "Retouched.jpg".” number -1728 from image “Retouched.jpg”
set temp to alias "Whopper:Users:johnclark:TEMP FOLDER:"
set this_item to choose file
tell application "Image Events"
launch
set this_image to open this_item
save this_image in temp as JPEG with compression level low
close this_image
end tell
Hi.
You’re supposed to save images to files, not to folders! Something like this:
set temp to (path to home folder as text) & "TEMP FOLDER:"
set this_item to choose file
tell application "System Events" to set {fName, fExt} to {name, name extension} of this_item
set jpeg_name to text 1 thru (-1 - (count fExt)) of fName & "jpg"
tell application "Image Events"
launch
set this_image to open this_item
save this_image in file (temp & jpeg_name) as JPEG with compression level low
close this_image
end tell
Thanks Nigel
I am a photographer but a hopeless bodger of applescript and all things coding. The old script worked for years but the more apple tighten up the more I will be found out!!
Thanks