1 Reply Latest reply: Nov 11, 2011 9:07 AM by Peter-the-Pea RSS

    Photoshop CS5 bug, can not copy/cut from JS - PC only.

    Max Penson Community Member

      I have stumbled upon what I believe is a serious bug in PS5 when using extensions or panels. It seems that copy and cut via JS do not work on Windows!

       

      Do this:

      Using Adobe Configurator 2.0 create a new panel with one JS button

      Use this JS code  var docRef = app.activeDocument;docRef.selection.copy();

      Run the panel on PS5 on MAC - works!

      Run the panel on PS5 on Windows - DOES NOT WORK!

       

      This is the same result as when creating a panel with flash builder + JS file.

       

      I've created a panel with this JS code so you can try it:

      http://www.2shared.com/file/8WO5xuUf/untitled-1.html

       

      Copy and cut with JS running from the ExtendScript toolkit or just from the scripting menu works fine on Windows. It does not work when running from Flash.

       

      Any suggestions?

        • 1. Re: Photoshop CS5 bug, can not copy/cut from JS - PC only.
          Peter-the-Pea

          Hi,

           

          I'm having the same issue - Copy is failing to work when calling a script through a panel,  yet it works fine in the toolkit.

          What's the solution to this?  The initial report of this was 12-04-09  Please dont tell me that this has not been addressed in 2.5 years???

           

          I have tried the following:

           

          refSel = app.activeDocument.selection.load(app.activeDocument.channels.getByName("Alpha 1"));  
          var idcopy = charIDToTypeID( "copy" );
          executeAction( idcopy, undefined, DialogModes.NO );
          var idpaste = charIDToTypeID( "past" );
          executeAction( idpaste, undefined, DialogModes.NO );   

           

           

          and:

           

          var selected = app.activeDocument.channels.getByName("Alpha 1")
          app.activeDocument.selection.load(selected)
          app.activeDocument.selection.copy()
          app.activeDocument.paste()

           

          Neither work,  This issue is going to prevent us moving to using panels and Java scripts - forcing us to stay with actions, which is far from ideal!

           

          Please can I get some information on this issue...

           

          UPDATE:

          This issue also causes `copy` and `paste` functionality on the computer to stop working.

          I have a work around using duplicate, invert selection and clear... but this still has the issue with `copy / paste` not working...

           

          Cheers,

          Pete.