Skip to main content
Participant
February 28, 2017
Answered

Save As Tiff not Scriptable (Photoshop Error 8800)

  • February 28, 2017
  • 3 replies
  • 1510 views

Hi Guys, I've been developing a script to simply run on any active document and save it down into a new folder (/EDIT/TIFF) within the original documents path. I've done the exact same script with a JPEG with no errors and yet when I run this version (see below) Photoshop throws up the error: "Error 8800: General Photoshop Error occurred. This functionality may not be available in this version of Photoshop. - <no additional information availible>" Unfortunately looking through the forums I see this error 8800 appear for various reasons... most of which solutions seem to be to reinstall Photoshop (Which I have subsequently tried).

var doc = activeDocument;

var docPath = activeDocument.path.fullName;

var docName = doc.name;

var saveName2 = new File(docPath+"/EDIT/TIFF/"+docName+'.tff');

tiffSaveOptions = new TiffSaveOptions();  

tiffSaveOptions.embedColorProfile = true;  

tiffSaveOptions.alphaChannels = true;  

tiffSaveOptions.layers = true;

var folder1 = Folder("EDIT");

//Check if it exist, if not create it.

if(!folder1.exists) folder1.create();

var folder2 = Folder("EDIT/TIFF");

//Check if it exist, if not create it.

if(!folder2.exists) folder2.create();

app.activeDocument.saveAs(SaveName2, tiffSaveOptions, true, Extension.LOWERCASE);

If anybody could give me any guidance or advice in regards to the Photoshop Error 8800, making this above script work or even providing an alternative script to do so it'd be much appreciated.

Photoshop Version: CC 2017.0.1

This topic has been closed for replies.
Correct answer SuperMerlin

It fails because it cannot create the folders as you have not given the full paths.

var doc = activeDocument;

var docPath = activeDocument.path.fullName;

var docName = doc.name;

var saveName2 = new File(docPath+"/EDIT/TIFF/"+docName+'.tff');

tiffSaveOptions = new TiffSaveOptions();  

tiffSaveOptions.embedColorProfile = true;  

tiffSaveOptions.alphaChannels = true;  

tiffSaveOptions.layers = true;

var folder1 = Folder(docPath  + "/EDIT"); //Check if it exist, if not create it.

if(!folder1.exists) folder1.create();

var folder2 = Folder(docPath  + "/EDIT/TIFF"); //Check if it exist, if not create it.

if(!folder2.exists) folder2.create();

app.activeDocument.saveAs(SaveName2, tiffSaveOptions, true, Extension.LOWERCASE);

3 replies

Participant
February 28, 2017

Hi Guys!

Thanks for that! It works perfectly! I might be face-palming a bit for missing something so simple but otherwise all good! Didn't expect such a swift reply so thanks greatly for that.

In future I will run through these things with the ExtendScript Toolkit (Thanks for pointing that out) - As you can probably tell I'm new to scripting in JSX and for Photoshop.

Cheers!

SuperMerlin
SuperMerlinCorrect answer
Inspiring
February 28, 2017

It fails because it cannot create the folders as you have not given the full paths.

var doc = activeDocument;

var docPath = activeDocument.path.fullName;

var docName = doc.name;

var saveName2 = new File(docPath+"/EDIT/TIFF/"+docName+'.tff');

tiffSaveOptions = new TiffSaveOptions();  

tiffSaveOptions.embedColorProfile = true;  

tiffSaveOptions.alphaChannels = true;  

tiffSaveOptions.layers = true;

var folder1 = Folder(docPath  + "/EDIT"); //Check if it exist, if not create it.

if(!folder1.exists) folder1.create();

var folder2 = Folder(docPath  + "/EDIT/TIFF"); //Check if it exist, if not create it.

if(!folder2.exists) folder2.create();

app.activeDocument.saveAs(SaveName2, tiffSaveOptions, true, Extension.LOWERCASE);

Legend
February 28, 2017

The "This functionality may not be available in this version of Photoshop." error message usually means that there is a bug in the JavaScript.

To deal with this, you best use the ExtendScript Toolkit, and first check whether the syntax is correct. Then you run the script from the ExtendScript Toolkit. First just so, then, if you still can not localize the error, run it in debugging mode.

And that should let you find the problem.