Sample Header Ad - 728x90

AppleScript - replace substring in image names right after exporting them with Pixelmator and overwriting old images

1 vote
0 answers
70 views
After opening and editing images with Pixelmator pro I use this script: tell application "Pixelmator Pro" set exportLocation to choose folder with prompt "Please select where you'd like export the images:" repeat (number of documents) times export the front document to file ((exportLocation as text) & (name of the front document) & ".jpg") as JPEG with properties {compression factor:85} close the front document without saving end repeat end tell to export them to the directory where the original images are. The original image names are abc.jpg, def.jpg, ghi.jpg and after export it creates new images with those names: abc.pxd.jpg, def.pxd.jpg, ghi.pxd.jpg How can I save the JPGs under their old name (abc.jpg, def.jpg, ghi.jpg) and overwrite the existing file?
Asked by Coddo (111 rep)
Feb 28, 2023, 02:25 PM
Last activity: Mar 1, 2023, 07:21 AM