Copy link to clipboard
Copied
Hi, I created a small script for my work that worked fine until recently when I discovered a problem.
When I run the jsfl file under the commands folder, once I perform a Ctrl+Z undo operation, an irreversible residue appears on the screen.
No matter what I do, the residue appears whenever I use Ctrl+Z.
Can this problem be solved, or is it inevitable?
code:
fl.getDocumentDOM().clipCopy();
fl.createDocument();
fl.getDocumentDOM().clipPaste();
fl.getDocumentDOM().library.selectAll();
var lib = fl.getDocumentDOM().library;
for(var i in lib) for(var j in lib[i])
 lib[i][j].name = 'fl' + Math.floor(Math.random()*100000) + '_' + Math.floor(Math.random()*100000);
//Paste the object into the original document
fl.getDocumentDOM().clipCopy();
fl.closeDocument(fl.getDocumentDOM(), false);
fl.getDocumentDOM().clipPaste();
Have something to add?