I have over 1400 groups of 2 objects, a black arrow on top of a white arrow. Instead of keeping things simple, my psychotic client now wants some of the white arrows deleted. I THOUGHT I could write a script to ungroup them and just check .Selection(1) and .Selection(2) for the color and delete the white one. However, as soon as the Ungroup command executes the items are de-selected.
Then I thought I might be able to work within the group with something like .Selection(1).Groups(1).Item(1).Delete but I can't seem to find anything. When I select a group of two items .Selection(1).Groups.Count returns zero.
in JS you would do it like this:
var myGroup = app.selection;
var myGroupItems = myGroup.allPageItems;
for ( var i = 0; i < myGroupItems.length; i++ )
if (myGroupItems[i].ONEPROPERTY == ONEVALUE )
You can decide to check pageItems or allPageItems of a group at your own.