NO, NO and NO.
I can’t guess what you really did but I repeat: I’m sure that the script listed in this message didn’t shrink the picture, it does ABSOLUTELY NOTHING".
The main problem here is that you don’t understand what the instructions are supposed to achieve.
I will try to explain them one by one.
on open draggeditems
Is the entry point used when something is dropped upon the app’s icon
--set draggeditems to choose file of type {"public.jpeg"} with multiple selections allowed
Is a disabled instruction which I enable when I test the script in its applet structure (in such case, on open draggeditems is disabled)
--set text1 to my recolle(draggeditems, linefeed)
When it’s enabled, this instruction change the list of files dragged on the icon into a block of text like :
SSD 1000:Users:DSC_0257 - opposite.jpg
SSD 1000:Users:DSC_0257 - rotated.jpg
SSD 1000:Users:DSC_0257 - upDown.jpg
SSD 1000:Users:DSC_0257.JPG
--repeat with aFile in draggeditems
--set contents of aFile to quoted form of POSIX path of aFile & space
--end repeat
When it’s enabled, this loop replace the list of dropped aliases by a list of quoted POSIX paths
like :
{“/Users//Desktop/DSC_0257 - opposite.jpg", "/Users//Desktop/DSC_0257 - rotated.jpg”, “/Users//Desktop/DSC_0257 - upDown.jpg", "/Users//Desktop/DSC_0257.JPG”}
--set text2 to my recolle(draggeditems, linefeed)
When it’s enabled, this instruction change the list of POSIX Paths into a block of text like :
“‘/Users//Desktop/DSC_0257 - opposite.jpg’
'/Users//Desktop/DSC_0257 - rotated.jpg’
‘/Users//Desktop/DSC_0257 - upDown.jpg’
'/Users//Desktop/DSC_0257.JPG’”
-- display dialog text1 & linefeed & text2
When it’s enabled, this instruction display the block of text built just before.
-- do shell script "sips --resampleHeightWidthMax 50000 " & draggeditems
When it’s enabled, this instruction apply the command supposed to shrink the files described by the list of quoted POSIX Paths.
end open
This instruction is the the end point of the handler.
In the posted script, all these instructions, except on open draggeditems an end open, are disabled so they do nothing.
Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) dimanche 24 mai 2020 15:31:37