Script to Find object style and apply percentage to image
- January 7, 2024
- 2 replies
- 789 views
I've tried to build a script that find all the items in a document with a specific object style and apply a percentage to their content (image).
But I've run into many problems… (i'm not a very good scripter, I've tried the help of ChatGPT and it's really not perfect(!!). It almost do what I want… but it's inelegant and doesn't really work.
The main problem seems to be creating a prompt at the beginning asking for :
1 - The percentage we want applied to images
2- The object style targeted (with a dropdown menu of the styles of the document)
3- The reference point by which the scale will be done (this could also be done using the current selected reference point in the control panel… but I dont find how)
I've join a document showing the intended result. The targeted images are in anchored groups and their frames has "Objects to scale" as object style. At the bottom of the page is the desired result, all the images are at the same percentage (10%) and transformed by the bottom center.
Anyone input on this would be greatly appreciated (and maybe a great tool for many others!) Thanks !
