Question
Finding specific groups by name
Hi all,
Working on a script to handle anchored groups. But I only want to target specific anchored groups by their name.
I have managed it to work for before when I wanted to target a rectangle within a group:
var t = myDoc.stories.everyItem(0).groups.everyItem(0).rectangles.item("image").getElements();
t.length returns the correct number of groups with a rectangle inside with the name "image. And I can use t to select the rectangle.
But whe I try to do it with the groups instead:
var t = myDoc.stories.everyItem().groups.item("marginImage").getElements();
t.length only return "1" even tif there are several groups it the name "marginImage".
Can anyone figure out why it's not working for the groups?
My best regards!
My best regards!
