Running a JavaScript via Action Produced a Different Result than Running the Script Directly
I have a JavaScript that takes a working file and manipulates the objects within the layers, then saves it out as a PDF.
The file is structured with four layers; [Art, Marks, Bleed, and Panel]
The script takes all the editable text items from the Art Layer and duplicates them onto a new layer called "Fonts."
It also takes all the objects within the "Panel" Layer and duplicates them onto a new layer labeled "OCG-Preview"
It then combines all the OCG-Preview items into one path item.
I also have an item description layer that is added and the name updated by the user via prompt.
For some reason when I execute the script from File->Scripts it works fine.
However, when I assign it to an action using the "Insert Menu Item" and run it from the action it bugs out and produced unwanted affects.
If I close illustrator and reopen to run the action it works the first time, yet, anytime afterwards it deletes all items on the Art layer, and it would seem like it's taking all the items from the Art Layer and trys to make the OCG-Preview Layer with them.
