Copying A Selection Driving Me Nuts

After manually making a selection the whole routine is supposed to something like this…

Copy the selection and paste inplace to another document.
It seems to be falling over at the first step on Windows.

Any help on this would be very welcome.

const batchPlay = require("photoshop").action.batchPlay;
   const result = await batchPlay(
   [
      
      {
         "_obj": "copyEvent",
         "copyHint": "pixels",
         "_isCommand": true,
         "_options": {
            "dialogOptions": "dontDisplay"
         }
      }
   ],{
      "synchronousExecution": false,
      "modalBehavior": "fail"
   });

Screenshot 2021-07-19 150637

"_options": {
  "dialogOptions": "dontDisplay"
}

seems to be the problem here. If you remove it, the alert doesn’t pop up.

That does remove the alert but it doesnt appear to copy anything because under the Edit Menu, Paste is Disabled

Do you have some non-transparent pixels when you copy?

No I dont. I even filled the whole document with black and it still doesnt copy anything.

I dont have my Mac here at the moment so unable to confirm it its just a Windows issue

I’m a bit confused :slight_smile: So you don’t have non-transparent pixels? Or you do have? Because you mentioned all black :slight_smile: My guess was, that nothing is copied if all pixels are transparent

What I mean is that I have even created a new document, filled it with Black, made a selection with the Lasso Tool and tried to copy that selection and still nothing appears to get copied

No idea why, but it appears to be working now.

Thanks for everyones input.

I spoke to soon :frowning:
It works perfect on the MAC but just not on Windows.