Stephen,
This is very close to what I need, thanks for helping! What I'm really trying to do, however, is a little different. Sorry if I wasn't clear.
What I'd like is this:
1.) I have a folder with several different psd files
2.) I will run a Batch Action on these files to edit all their appearances (I believe this was your question earlier about any resizing, which I must have misunderstood)
3.) The last step in the given action, I would like to be the Save for Web using the nomenclature "psdFilename_mySuffix"
4.) Close and don't save psd.
It seems you answered this in my other thread, which I apologize for tagging onto that post and asking the same question. I will try this with Image Processor Pro as recommended and let you know how it goes.
UPDATE: I've downloaded and followed the instructions for installing IPP, however don't have the listed folder (/Developer) on my Mac so chose to install in a different location. The install seemed to work, but when I go to File > Automate, Image Processor Pro is missing. If I leave the setting to install at /Developer, photoshop closes as soon as I hit Next. Also, will this even work since I'm opening psd files and saving as png? All the examples and tutorial I've seen for IPP open actual images (jpg).
Thanks!
You can indeed use IPP instead of Batch, it will work with all different file formats and can rename and run an action, so a custom dedicated script is not really required for what you want to do as IPP is a “Swiss army knife” and can “do it all”. In this case, you don’t wish to record the IPP settings into an action, as IPP is performing the batch and running any actions required. Other scripts can be recorded into actions for use with IPP, IPP is not intended to be recorded into an action for use with Batch processing, but IPP can be recorded into an action for non batch use. IPP can be installed manually from a .zip or automated from the Adobe ExtensionManager or a 3rd party extension manager application. The manual installation instructions have to be followed exactly.
EDIT: Here is a script that I have changed from saving out JPG files to PNG, this should hopefully now do what you want.
/*
Scripted Save for Web sRGB PNG with SUFFIX.jsx
Export Save for Web a PNG24 transparent version of the original image converted to sRGB using a
filename suffix of "_mySuffix" and close down the original file without saving
https://forums.adobe.com/message/7971520
https://forums.adobe.com/message/10935403 – changed from jpg to png
*/
#target photoshop;
// displayDialogs = DialogModes.NO;
if (documents.length) {
var doc = activeDocument;
if (doc.colorProfileName.substring(0, 4) != "sRGB")
doc.convertProfile("sRGB IEC61966-2.1", Intent.RELATIVECOLORIMETRIC, true, false);
try {
Path = doc.path;
}
catch (e) {
// alert("this document has not been saved.")
Path = Folder.desktop;
}
var Name = doc.name.replace(/\.[^\.]+$/, '');
var saveFile = File(Path + "/" + Name + "_mySuffix" + ".png"); // Change "_mySuffix" to another valid filename string
SaveForWeb(saveFile);
}
function SaveForWeb() {
var sfwOptions = new ExportOptionsSaveForWeb();
sfwOptions.format = SaveDocumentType.PNG;
sfwOptions.PNG8 = false;
sfwOptions.interlaced = false;
sfwOptions.transparency = true;
sfwOptions.includeProfile = true;
//sfwOptions.matte = true;
//sfwOptions.matteColor = 0, 0, 0;
activeDocument.exportDocument(saveFile, ExportType.SAVEFORWEB, sfwOptions);
};
doc.close(SaveOptions.DONOTSAVECHANGES);