• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Find a Script Label item in a multipage document

Community Beginner ,
May 25, 2018 May 25, 2018

Copy link to clipboard

Copied

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!

TOPICS
Scripting

Views

381

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 25, 2018 May 25, 2018

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines