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

How to move active page and cursor to findText result

Explorer ,
Apr 05, 2017 Apr 05, 2017

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
882
Translate
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

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

x[0].showText();

... should do it.

Ariel

Translate
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
LATEST

thanks. works great

Translate
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