Skip to main content
Inspiring
October 18, 2011
Question

Error 8800: General Photoshop error occurred....

  • October 18, 2011
  • 5 replies
  • 9814 views

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?

This topic has been closed for replies.

5 replies

Inspiring
November 6, 2011

yes reopening photoshop would make the manually runned script work again, as well as randomly selecting other tools..

At the moment i am using a workaround. Instead of copying the channel and pasting it into another document, i ducplicate the whole document and delete all the other channels.

Perhaps this can be applied to your problem too.

Odd bugs(?) like that really take the fun out of scripting in photoshop :/

Inspiring
October 25, 2011

Come on Photoshop people, i need advice ^^.

Any known bugs about the "copy" function?

Sometimes when running my script i get the error "paste is currently not available..etc", because the clipboard is empty.

After selection/deselection some tools the script works again (because .copy works).

Any Experience with this?

Participant
November 5, 2011

We've got the exact same problem. Also a script to manage and updat psd's with lot's of channels.

Script are running fine executed from the Bridge, as inside photoshop as an action, or direcly from the extendscript editor.

Then we created panels with configurator 2.0. The scripts run, but the copy function doesn't operate, nothing gets copied to the clipboard.

We tried calling the function directly inside the panel buttons, calling it from an external file, and also by referring to an action (which works, but doesn't work when called from the panel....). nothing works.

This issue/bug renders the panel configurator (which is a supercool tool) completely useless...

adobeCS5 64bit @ windows7

Participant
November 5, 2011

blackpainter, could you confirm this;

after running the script from the panel the copy function also stopped working manually.. reopen photoshop and everything is normal again..

Inspiring
October 20, 2011

Im sorry to spam my own thread here (kinda *feels* like talking to myself),

but I narrowed the problem down. It does have to do with Photoshops copy function.

Manual tests showed that sometimes i can and sometimes i cant copy the channel (So far i see no logic reason for my disability to copy).

Weirdly after i switch to another tool copying starts working again (...?).

My desperation now makes me try switching between tools in my script , gonna keep this thread up to date.

Inspiring
October 20, 2011

ok ... what works manually needs not work in a script ..

Inspiring
October 19, 2011

When i manually browse to and run the script everything works fine, but if i implement the code into a panel (adobe configurator 2.0) it does not copy my channels.

So my new question, what is changed when a script is run via panel? Does imbedding the code somehow change the code itself? Or any settings?

Im really frustrated, because the code actually works -.-.

Inspiring
October 18, 2011

I thought this might be a problem with the cache or history, but clearing both did not help.