Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to perform via applescript some action on all items inside the Illustrator document apart of groups.

When I set my counter as

"repeat with i from (count page items of current document) to 1 by -1"

should I subtract the number of groups inside the document?

In other words are groups included in "page items"?

share|improve this question
up vote 0 down vote accepted

I've checked the question via simple script:

tell application "Adobe Illustrator"
    set numberOfItems to (count page items in current document)
    display dialog numberOfItems

end tell

When I have 3 shapes the numberOfItems is 3, but when I group two of them (OR all of them in one group), then the numberOfItems is 4.

Thus, groups are different items and should be counted/treated appropriately...

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.