I have a snippet of a script I can’t seem to get working. I need to get a group of items selected, some contained in the spread and some that are on the pasteboard. My document size is 26 inches. The following is the snippet of the script:
tell application "Adobe InDesign CS5.5"
set originalDoc to active document
tell originalDoc
set selectForPage2 to (every item of all page items of page 1 where item 1 of its geometric bounds is greater than 0 and item 1 of its geometric bounds is less than 21 and item 2 of its geometric bounds is greater than 27 and item 2 of its geometric bounds is less than 40)
select selectForPage2
end tell
end tell
This results in nothing being selected (because it is only trying to select the items on the pasteboard.
tell application "Adobe InDesign CS5.5"
set originalDoc to active document
tell originalDoc
set selectForPage2 to (every item of all page items of page 1 where item 1 of its geometric bounds is greater than 0 and item 1 of its geometric bounds is less than 21 and item 2 of its geometric bounds is greater than 12 and item 2 of its geometric bounds is less than 26)
select selectForPage2
end tell
end tell
This works as intended since the boundaries are all within the document’s page size.
tell application "Adobe InDesign CS5.5"
set originalDoc to active document
tell originalDoc
set selectForPage2 to (every item of all page items of page 1 where item 1 of its geometric bounds is greater than 0 and item 1 of its geometric bounds is less than 21 and item 2 of its geometric bounds is greater than 12 and item 2 of its geometric bounds is less than 40)
select selectForPage2
end tell
end tell
This only selects the items within the document but nothing on the pasteboard.
Any ideas would be greatly appreciated.