• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

group two items in Indesign CS4? - applescript, sample script attached not working

New Here ,
Nov 10, 2009 Nov 10, 2009

Copy link to clipboard

Copied

hello,

does anyone know why this script below does not work ? I am trying to duplicate frame with image and then group them together, but cant figure out how

any help is very appreciated . Thank you

tell application "Adobe InDesign CS4"

     tell active document
     set mySelection to item 1 of selection

     duplicate mySelection

     set mySelection2 to item 1 of selection

          tell mySelection2
          bring to front
          end tell

          make group with properties {group items:{mySelection2, mySelection}}

     end tell

end tell

TOPICS
Scripting

Views

2.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 10, 2009 Nov 10, 2009

Copy link to clipboard

Copied

just realized I was grouping same item. New code below... but still does not work ... error "cant make class group."

tell application "Adobe InDesign CS4"

     tell active document
     set mySelection to item 1 of selection

     set mySelection2 to duplicate mySelection

          tell mySelection2
          bring to front
          end tell
     tell active document
     make group with properties {group items:{mySelection2, mySelection}}
     end tell
     end tell

end tell

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Nov 10, 2009 Nov 10, 2009

Copy link to clipboard

Copied

The group command seems to insist on an "at" parameter. For example, assuming mySeelction is directly on a page:

  make group at parent of mySelection with properties {group items:{mySelection2, mySelection}}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 28, 2025 Jan 28, 2025

Copy link to clipboard

Copied

LATEST

just in case someone comes up upon this thread looking for an answer, the answer is here:

https://community.adobe.com/t5/indesign-discussions/grouping-selected-objects-in-indesign-via-apples...

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines