On 09/02/2012, at 7:10 AM, Houston, Brad wrote:
Does anyone know of a way to select multiple (or any) page objects, in InDesign CS5, within defined geometric bounds (i.e., mimicking the way you might marquee an area of a page to select everything that intrudes inside that marquee?
set {y1, x1, y2, x2} to {100, 100, 400, 400} -- area for selection tell application "Adobe InDesign CS5" tell page 1 of document 1 select (every page item where ¬ ((item 1 of its geometric bounds < y2 and item 1 of its geometric bounds > y1) ¬ or (item 3 of its geometric bounds > y1 and item 3 of its geometric bounds < y2)) ¬ and ¬ ((item 2 of its geometric bounds < x2 and item 2 of its geometric bounds > x1) ¬ or (item 4 of its geometric bounds > x1 and item 4 of its geometric bounds < x2)) ¬ ) end tell end tell
|