Article View: adobe.photoshop.scripting
Article #181Javascript template for cs4 needed
From: Paulo_Skylar
Date: Sat, 07 Mar 2009 16:54
Date: Sat, 07 Mar 2009 16:54
21 lines
2194 bytes
2194 bytes
I am in need of some help to create a javascript to write jpeg files from PS-CS4 psd files. What would be most useful is a pointer to a suitable Javascript template to tailor to my needs. The operations seem simple enough, but my only scripting experience is limited to simple ActionScript 3.0 .
I have numerous psd files each of which has 12 layers (some layers are groups). Think of these as 3 scene layers and 9 subject variation layers. I need to select a scene layer, select a subject variation layer and then write a jpeg file of that composition to a folder. The file name wants to be psdname_scenelayername_subjectvariationname.jpg, where each of the names is taken from the open psd file and the layers selected. This is then repeated so that each subject layer (9) is paired with each scene layer (9) yielding 27 separate files. I actually have to do this with various psd files, but I can manually run the script on each psd file for now instead of batch processing. This sounds like setting layer comps and then sending comps to files, but the subject variation layers contain smart objects and adjustment layers that layer comps (apparently) cannot track.
So it seems that on an open psd file I need to:
set the visibility of all layers off
set the visibility of scene A on
set the visibility of subject variation 1 on
save as jpeg
set name (psdname_A_1.jpg)
set jpeg quality
set destination folder
repeat above for each subject variation, changing the jpg file name
repeat above for each scene, changing the jpg file name
end
Any help in getting this automation started would be appreciated.
Thanks,
Paulo
Technical Details
Message-ID:
<59b8267f.-1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!newshub.sdsu.edu!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: f5839,6a585aaa247cb861,start X-Google-Attributes: gidf5839,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Paulo_Skylar@adobeforums.com Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.photoshop.scripting Subject: Javascript template for cs4 needed Message-ID: <59b8267f.-1@webcrossing.la2eafNXanI> Date: Sat, 7 Mar 2009 08:54:48 -0800 Lines: 37 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit