Okay this should be a piece of cake for all of you How would I get this script to process…
A) by choosing multiple files?
or
B) as a droplet?
Is this something common, to edit script to be droplets or “multiple file choose” (interchangeably)?
How do you normally save your scripts?
set this_file to choose file without invisibles
set the target_length to 1200
try
tell application "Image Events"
--start the Image Events application
launch
--open the image file
set this_image to open this_file
--get dimensions of image
copy dimensions of this_image to {W, H}
--determine the shortest side and then
--calculate the new height for the longer side
if W is less than H then
set the scale_length to (H * target_length) / W
set the scale_length to ¬
round scale_length rounding as taught in school
else
set scale_length to (W * target_length) / H
set the scale_length to ¬
round scale_length rounding as taught in school
end if
--perform action
scale this_image to size scale_length
--save the changes
save this_image with icon
--purge open image data
close this_image
end tell
on error error_message
display dialog error_message
end try
I’m still getting my feet wet and I am not getting this.
thank you,
~N