Friday, November 15, 2024

How to make this automation? An icon, on the desktop, drag an image file to it, and a half-size image is created. (Ideally with osascript approach)

Specifically

  • the size of the new image is 50% of the pixels original

  • the new image is converted to a jpg, ideally

  • ideally, the resolution is set to 72 (ie, if it was 144 or another value)

  • the new image is named test.jpg (per Finder, if there’s already a test.jpg sitting around, it would be test 2.jpg etc)

  • bonus: the position of the new image file, on the desktop, is, the same as the input image, but, moved right 20 / left 20 points !

  • Purely IMnewbO, the best automation in Finder is using osascript, as there is no delay. It would be great to do the above with osascript but maybe I’m misguided.

Is it possible?

I can’t find the relevant osascript commands as osascript is totally undocumented (indeed I barely know how to use osascript as it is conceptually totally undocumented, as well as the commands being totally undocumented).

I do not know any other procedures to create such a desktop-icon function, and could not google any. I stumbled on the “record” function on “Automator” (which I have utterly no clue about, as it’s completely undocumented, but if you search bar Automator on your Mac something opens), but the “record” feature seems unusable since it “plays back” in real time rather than just performing the operation.

Related Articles

Latest Articles