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

How to move active page and cursor to findText result

Explorer ,
Apr 05, 2017 Apr 05, 2017

Copy link to clipboard

Copied

I'm trying the following:

app.findTextPreferences = app.changeTextPreferences = null;

app.findTextPreferences.appliedParagraphStyle=app.activeDocument.paragraphStyles.itemByName("someParaStyle");

x=app.activeDocument.findText();

next=x[0];

    app.activeDocument.activePage=next.parentPage;

What I want is for the active page on screen to change to the page that x[0] is on -- and for the cursor to be in the x[0] position.

Any suggestions how to do it?

(basically trying to add a "find next" capability to a script)

Thanks

TOPICS
Scripting

Views

748

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

correct answers 1 Correct answer

People's Champ , Apr 06, 2017 Apr 06, 2017

x[0].showText();

... should do it.

Ariel

Votes

Translate

Translate
People's Champ ,
Apr 06, 2017 Apr 06, 2017

Copy link to clipboard

Copied

x[0].showText();

... should do it.

Ariel

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
Explorer ,
Apr 06, 2017 Apr 06, 2017

Copy link to clipboard

Copied

LATEST

thanks. works great

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