Hello,
I have script I’ve been working on that will (hopefully) select all page items, group them and then duplicate them on an expanded document size, ( think of a gang up or imposition). It works great until I add a graphic frame to the page and then I get “invalid parameter” error at the group line of code. I’ve posted the script as it stands now,
Thanks in advance
tell application "Adobe InDesign 2021"
set myDocument to document 1
tell document preferences of myDocument
set myPWidth to page width
set myPHeight to page height
end tell
end tell
tell application "Adobe InDesign 2021"
set myPage to page 1 of myDocument
tell myPage
set myRectangle to make rectangle with properties {geometric bounds:{myPHeight, 0, 0, myPWidth}}
tell myRectangle
set fill color to "None"
set stroke color to "None"
end tell
end tell
end tell
tell application "Adobe InDesign 2021"
set myDocument to document 1
tell document preferences of myDocument
set myNewPWidth to page width * 2
set myNewPHeight to page height * 2
set page width to myNewPWidth
set page height to myNewPHeight
end tell
end tell
tell application "Adobe InDesign 2021"
set thisPage to page 1 of active document
set myGroup to make group at parent of item 1 of (all page items of thisPage) with properties {group items:(all page items of thisPage)}
move myGroup to {0, 0}
duplicate myGroup to {0, myNewPHeight / 2}
duplicate myGroup to {myNewPWidth / 2, 0}
duplicate myGroup to {myNewPWidth / 2, myNewPHeight / 2}
end tell