Copy link to clipboard
Copied
Hi
I am using Photoshop 23.0 and the folllowing code is working perfectly for me -
var outputFolder = new Folder("E:/Test/");
var outputPath = outputFolder.fsName;
var selectedColorProfile = "Adobe RGB (1998)";
var outputPsdFile = new File(outputPath + "\\" + "test.psd");
var designPsd = app.documents.add( UnitValue(18,'IN'), UnitValue(12,'IN'), 300, "",NewDocumentMode.RGB, DocumentFill.WHITE,1.0, BitsPerChannelType.EIGHT, selectedColorProfile );
designPsd.saveAs(outputPsdFile);
//Many other edit operations
designPsd.save();
designPsd.close();
But my friend is using Photoshop 24.3.0 and he is getting the following error at designPsd.save() line -
This is really strange! I changed the line to -
Finally I changed the line to -
Copy link to clipboard
Copied
Why hasn’t your friend updated Photoshop?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hi @c.pfaffenbichler
Thanks a lot for your reply! But how to handle codes that would be deployed to many end users who would use many different versions of photoshop?
Should I explicitly check the specific version of photoshop before file.save() and if it's 24.3, then code differently?
Thanks again.
Copy link to clipboard
Copied
I don’t consider that a meaningful approach to address something like this.
The bug was fixed within less than 30 days (if I remember correctly), if some Photoshop users don’t maintain their tools properly that should not be your problem.
Only when using fairly new features (like neural filters for example) in a Script would it make sense, in my opinion, to verify if the Photoshop version meets the requirements.
Copy link to clipboard
Copied
Thanks again.