Photoshop script not working after updating to 2021
I have a Photoshop script (Javascript) that copy paste paths from one image to another. It has worked for a long time, but with PS 2021 (22.1.0) on Windows 10, I get an error in this code where the selected path is copied (3rd line),
1. currentDoc.pathItems[0].select();
2. var id122 = charIDToTypeID("copy");
3. executeAction( id122, undefined, DialogModes.NO );
"General Photoshop error occurred. This functionality may not be available in this version of Photoshop"
Everything works fine up to that line of code, image with path (currentDoc - this is the active document) is open in Photoshop and path is selected as intended and the destination image also open. Variable id122 has an int value too.
Any idea how to fix this error?
Thanks
