Select path using script
Hi,
Every now and than I have lots of images to save for the web (1-2k images in one time). All the images are .psd and have or path or transparent background. I would like to select the path and erease backgrount to make triming possible. The paths are named different so it is another problem because actions in photoshop select only specific name of the path. So is it possible to select path regardless of its name? Or how to write script for selecting several names of paths (ie "path 1", "path 2", "selection 1"...) I hope you understand what i want to do...
I have another script which resizing images to corect size and save it for web. So when I have jpg's with white backgroound first I run action in photoshop to trim all images and then I run script to resize all images because script check if image is wider or higher...
If you need more information just ask... I have CS5 version Photoshop
regards,
voahyeah
Edit:
For now I wrote this :
app.activeDocument.pathItems.getByName('Path 2').makeSelection();
app.activeDocument.selection.invert();
app.activeDocument.selection.clear();
and it select only if the name of the path is 'Path 2' else it stops...
So when the namme is Path 2 everything is fine but I have 10-15 different names.... so it would be great to avoid name of the path. If it is possible to select the first parh (if there is more than one)
or if it is not possible to avoid path name how to wrote if els if block for this to check all path names...?
... thanks
