Skip to main content
Known Participant
May 25, 2018
Question

Find a Script Label item in a multipage document

  • May 25, 2018
  • 1 reply
  • 459 views

Hi all,

Pretty self explanatory but I'm not sure how to do it in applescript.

I have a 50 page document and one page within it has graphic frame labeled "findMe"

Is there a line of script that will cycle through all existing pages and select the findMe box?

Thanks!

This topic has been closed for replies.

1 reply

BarlaeDC
Community Expert
Community Expert
May 25, 2018

Hi,

You don't need to cycle through, you can just use this

tell application "Adobe InDesign CC 2018"

    tell document 1

        set myTextFrame to every text frame whose label is "findMe"

      set selection to myTextFrame

    end tell

end tell

That will get you an array of all the text frames which have the label "findMe" in your instance it will have a single entry, so it will only select the one text frame, obviously if it returns more than one text frame it would select them all, or we would need to add code to get the first one.

Regards

Malcolm