Hi, i need some help with this error:
Error 8800: General Photoshop error occurred. This functionality may not be available in this version of Photoshop.
-The command "Paste" is not currently available.
Line: 42
-> new Doc.paste()
With the respective part of code:
ar MainDoc = app.activeDocument var w = MainDoc.width var h = MainDoc.height function ChannelToImage(filechannelname) { app.purge(PurgeTarget.CLIPBOARDCACHE) // ======================================================= //selects the Channel with the name "filechannelname" var idslct = charIDToTypeID( "slct" ); var desc298 = new ActionDescriptor(); var idnull = charIDToTypeID( "null" ); var ref253 = new ActionReference(); var idChnl = charIDToTypeID( "Chnl" ); ref253.putName( idChnl, filechannelname ); desc298.putReference( idnull, ref253 ); executeAction( idslct, desc298, DialogModes.NO ); // MainDoc.selection.selectAll() MainDoc.selection.copy() MainDoc.selection.deselect() var newDoc = app.documents.add(w, h, MainDoc.resolution, filechannelname + "_new") app.activeDocument.selection.selectAll() try{ app.activeDocument.paste() } catch(clipboard_error) { activeDocument = MainDoc MainDoc.selection.selectAll() MainDoc.selection.copy(false) MainDoc.selection.deselect() app.activeDocument = newDoc newDoc.paste() } app.activeDocument.selection.deselect() app.activeDocument = MainDoc } ChannelToImage("COL")
I try to paste Channels of a multichannel file into new Documents.
At first it worked fine,but when i installed the script into a panel it stopped working.
And after i ran the "Panel"-Version, the manual running of the script wont work either.
I guess i figured out the problem, Photoshop does not always copy the selection and gets an error when i call the command "paste", as the clipboard is empty.
But i have no idea why it sometimes does and sometimes doesnt work. :/
Any experience with this error?