Script for merging each main groups/artboard into separate layers, with auto selection.
Hi
I need to run a script into a save action, and could use some help to rewrite a script.
The action i need the script to do, is merging each main group/artboard into seperate layers.
Is it possible to rewrite the script, so that photoshop selects the top layer (In my case a Artboard group) ?
When using "select --> All layers" i get a error (See attached) But if i manually select the top artboard, the scripts runs perfect!
This is my current script, and i think i just need to add a "select top group" kinda code.
target photoshop;

