I am automating copy and paste between two open files in Illustrator.I'm not using CreateFromFile since that strips variable names and otherwise alters the imported pageitems and makes them useless.
For some systems users get an error when the past command is used in the script.
Not much to it, after selected groups on the first document are selected a copy statement is used, the active document is changed, and a paste statement is used. It normally works but only on some combinations of selections on some computers. Adding a redraw() after the target document is activated avoids the error on some computers but not all.
copy(); doc.activate(); redraw(); doc.activeLayer = layerOption; paste();
An error occurs on the paste(); statement
an illustrator error occurred: 2('')
I've run directly from the ExtendScript toolkit editor and tried adding extra redraws() (to allow adobe to catch up to the scripting) all to no avail.
Any ideas on what I can try?