The 'Render Image Sequence' functionality returns an error when being called from Javascript
I've been extracting Javascript from some Photoshop actions to use in my Applescripts, with no issues at all. This was all going well until I came across an export action I had setup, which doesn't want to work. I've run the extracted script on Photoshop 2020, and it works as it should. Trying to run the same script on Photoshop 2022 returns the following error...
Adobe Photoshop 2022 got an error: General Photoshop error occurred. This functionality may not be available in this version of Photoshop. - Error 8800: General Photoshop error occurred. This functionality may not be available in this version of Photoshop. - The parameters for command “Export” are not currently valid. Line: 32 -> executeAction(cTID('Expr'), desc1, dialogMode);
I had a similar issue when using GUI methods a while back... older versions of Photoshop used 'Export Video', whereas it's now referred to as 'Export Image Sequence'. It's weird because I'm extracting the Javascript from Photoshop 2022, so you would assume this would be ok? I'm assuming the 'videoExport' part on Line 32 is no longer supported... Would anyone know what this might be referred to instead?
tell application "Adobe Photoshop 2022"
do javascript "cTID = function(s) { return app.charIDToTypeID(s); };
sTID = function(s) { return app.stringIDToTypeID(s); };
function VideoSequence() {
function step1(enabled, withDialog) {
if (enabled != undefined && !enabled)
return;
var dialogMode = (withDialog ? DialogModes.ALL : DialogModes.NO);
var desc1 = new ActionDescriptor();
var desc2 = new ActionDescriptor();
desc2.putPath(sTID('directory'), new File('/Users/blah.blah/Desktop/'));
desc2.putString(sTID('subdirectory'), 'Test_Folder');
desc2.putString(cTID('Nm '), 'Test_File_.png');
var desc3 = new ActionDescriptor();
var desc4 = new ActionDescriptor();
desc4.putEnumerated(cTID('Mthd'), sTID('PNGMethod'), sTID('quick'));
desc4.putEnumerated(sTID('PNGInterlaceType'), sTID('PNGInterlaceType'), sTID('PNGInterlaceNone'));
desc4.putEnumerated(sTID('PNGFilter'), sTID('PNGFilter'), sTID('PNGFilterAdaptive'));
desc4.putInteger(cTID('Cmpr'), 6);
desc3.putObject(cTID('As '), sTID('PNGFormat'), desc4);
desc2.putObject(sTID('sequenceRenderSettings'), sTID('sequenceRenderSettings'), desc3);
desc2.putInteger(sTID('minDigits'), 4);
desc2.putInteger(sTID('startNumber'), 0);
desc2.putBoolean(sTID('useDocumentSize'), true);
desc2.putDouble(sTID('frameRate'), 15);
desc2.putBoolean(sTID('allFrames'), true);
desc2.putEnumerated(sTID('renderAlpha'), sTID('alphaRendering'), sTID('straight'));
desc2.putInteger(cTID('Qlty'), 1);
desc2.putInteger(sTID('Z3DPrefHighQualityErrorThreshold'), 5);
desc1.putObject(cTID('Usng'), sTID('videoExport'), desc2);
executeAction(cTID('Expr'), desc1, dialogMode);
};
step1(); // Export
};
VideoSequence.main = function () {
VideoSequence();
};
VideoSequence.main();"
end tell