Skip to main content
July 2, 2008
Question

[JS] (CS2) (CS3) Test for container

  • July 2, 2008
  • 1 reply
  • 270 views
Hello,

I would like to make sure that whatever I have selected (app.selection) is the container and NOT the content, regardless of what the selection is (Item or Text). I know if you have multiple selections, you can only have objects and that is fine. But what if my selection is a rectangle placed in a textframe within a textframe, how do I reset the selection to be the be the OBJECT which contains all?

Thank you.
This topic has been closed for replies.

1 reply

Inspiring
July 2, 2008
Work your way up the parental chain and take the last exit before the page.

You could adapt this function: Dave Saunders, "[JS] InDesign CS3: finding page of arbitrary object?" #1, 24 Oct 2007 3:24 pm

Dave