PhotoshopForums.com Home
Navigate Contact FAQ Search Members
Looping script with new parameters
Post new topic   Reply to topic    PhotoshopForums.com Forum Index -> Actions and Automation
 See a User Guidelines violation? Please contact us.
Author Message

G>>

Joined: 01 Sep 2015
Posts: 1



PostPosted: Tue Sep 01, 2015 7:29 am    Post subject: Looping script with new parameters Reply with quote

I'm trying to make this script working in a loop and change parameters in each new loop:

var layerRef = app.activeDocument.artLayers.getByName("1");
layerRef.visible = true;

function saveJPEG( doc, saveFile, qty ) {
var saveOptions = new JPEGSaveOptions( );
saveOptions.embedColorProfile = true;
saveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
saveOptions.matte = MatteType.NONE;
saveOptions.quality = qty;
doc.saveAs( saveFile, saveOptions, true );
}
saveJPEG( app.activeDocument, new File('~/Desktop/1.jpg'), 10 );

The script is making later "1" visible and than save it in to jpeg as "1.jpg". In second loop I need it to make layer 2 visible (layer 1 is still visible - layers are blending) and save it as 2.jpeg. In third loop: layer 3 and save file 3.jpeg, ect...

Thank you.
G>>>
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PhotoshopForums.com Forum Index -> Actions and Automation All times are GMT - 6 Hours
Page 1 of 1
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Contact - User Guidelines >

Copyright © 2003-2016. PhotoshopForums.com, iFroggy Network. All Rights Reserved.
Powered by phpBB © phpBB Group. phpBB SEO. Privacy Policy.
We are in no way affiliated with Adobe. Photoshop, Adobe and related marks are registered trademarks of Adobe.
PhotoshopForums.com