I'm trying to make a script that will go through the selection and apply action to each group in the selection.
Here is what I'm trying to do:
- select a couple of individual groups
- apply an action to each group seperatly
My problem is that instead of applying it to each group it does it to all of them. I tried using a for loop but it didn't worked, I tried to deselect the group that passed the action but it failed to.
Here is my script:
var doc = app.activeDocument;
for (i=0; i < doc.groupItems.length; i++)
{
doc.groupItems[i].selected = true;
app.doScript("300", "Set 1"); //Action name - Folder Name
app.activeDocument.selection = null;
}