Answered
Save for web jpg , file name the active layer name
Hello!
I am looking for a script or action.
At default Photoshop "save for web panel" I need the file name to be the selected layer name.
Thanks!
Hello!
I am looking for a script or action.
At default Photoshop "save for web panel" I need the file name to be the selected layer name.
Thanks!
Thank you, Conrad, for your reply
Your suggestion is not fits my needs unfortunately.
This is my final solution, a beginner code, but it works
// Save for web, jpg
// file name = layer parent group name
#target photoshop
var outputFolder = Folder.selectDialog("Choose a folder to save your file.");
var theLayer = activeDocument.activeLayer;
var theName = theLayer.parent.name;
var doc = app.activeDocument;
var activeLayer = doc.activeLayer;
var newName = theName+'.jpg';
//jpg options
var jpgoptions = new ExportOptionsSaveForWeb();
jpgoptions.interlaced = false;
jpgoptions.quality = 50;
jpgoptions.includeProfile = false;
jpgoptions.format = SaveDocumentType.JPEG; // Document Type
doc.exportDocument(File(doc.path+'/'+newName),ExportType.SAVEFORWEB,jpgoptions);
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.