Copy link to clipboard
Copied
Hello Hello,
I want to have a script to save a .PSD file in the same folder as my working file (.PSB).
I am a newbie and tried got so far; but Photoshop tells me "Fehler 2: saveFilePSD ist undefiniert."
In English something like "Error 2: saveFilePSD is undefined.
my Script:
#target photoshop
app.bringToFront();
var folderPath = app.activeDocument.path;
var fileName = app.activeDocument.name.replace(/\.[^\.]+$/, '');
var fileType = ".psd";
var saveFile='';
saveFile=File(folderPath + '/' + fileName + fileType);
SavePSD(saveFilePSD);
function SavePSD(saveFilePSD) {
psdSaveOptions = new PhotoshopSaveOptions();
psdSaveOptions.embedColorProfile = true;
psdSaveOptions.alphaChannels = true;
psdSaveOptions.layers = true;
psdSaveOptions.annotations = true;
psdSaveOptions.spotColors = true;
app.activeDocument.saveAs(saveFilePSD, psdSaveOptions, true, Extension.LOWERCASE);
};
Script end
If somebody can help me and solve the problem, I would be very happy!
Thank you very much,
all the best
Florian
I solved it!
there should only be written "saveFile"
And not "saveFilePSD"
Cheers! 🙂
Copy link to clipboard
Copied
I solved it!
there should only be written "saveFile"
And not "saveFilePSD"
Cheers! 🙂