hi Havard,
You could do something like this, I moved the element for easy calculation, but you could cross reference with the bounds of the pages, in that case you could leave the element on its place. Anyway this is hopefully something useful.
tell application "Adobe InDesign CS5.5"
set mySelection to selection
set myDoc to active document
tell myDoc
if (count of mySelection) > 1 then
set myItem to make group with properties {group items:(mySelection)}
else
set myItem to item 1 of selection
end if
set {y1, x1, y2, x2} to geometric bounds of myItem
move myItem to {0, 0}
set {ny1, nx1, ny2, nx2} to geometric bounds of myItem
set theHeight to ny2
set theWidth to nx2
set geometric bounds of myItem to {y1, x1, y2, x2}
if (count of mySelection) > 1 then
ungroup myItem
end if
display dialog "the height is " & theHeight & ""
display dialog "the width is " & theWidth & ""
end tell
end tell
Best regards,
jan