Copy link to clipboard
Copied
var myDoc = app.activeDocument;
myDoc.exportFile("C:/Users/Home/Downloads/Blank3.jpg", ExportType.JPEG)
var myDoc = app.activeDocument;
myDoc.exportFile("C:/Users/Home/Downloads/Blank3.PSD", ExportType.Photoshop)
I've checked the documentation, which specifically called out that for photoshop I must include the file
extension (PSD) in the file specification, but that hasn't helped. What am I doing wrong?
1. The first arguement should be a file, not just a path.
2. Despite what the documentation shows, the constant should be all caps.
app.activeDocument.exportFile(new File("C:/Users/Home/Downloads/Blank3.PSD"), ExportType.PHOTOSHOP);
Copy link to clipboard
Copied
It's probably something with the export options you need to set. Some of that stuff doesn't work without explicitly setting some of those options. Check this:
https://ai-scripting.docsforadobe.dev/jsobjref/ExportOptionsPhotoshop.html
Mylenium
Copy link to clipboard
Copied
1. The first arguement should be a file, not just a path.
2. Despite what the documentation shows, the constant should be all caps.
app.activeDocument.exportFile(new File("C:/Users/Home/Downloads/Blank3.PSD"), ExportType.PHOTOSHOP);
Copy link to clipboard
Copied
Thanks! Capitalizing the constant was what did it.