Skip to main content
Inspiring
April 6, 2017
Answered

How to move active page and cursor to findText result

  • April 6, 2017
  • 1 reply
  • 890 views

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

This topic has been closed for replies.
Correct answer TᴀW

x[0].showText();

... should do it.

Ariel

1 reply

TᴀW
TᴀWCorrect answer
Legend
April 6, 2017

x[0].showText();

... should do it.

Ariel

id-extras.com | InDesign tools & scripts for typesetters, form designers, and translators
Inspiring
April 6, 2017

thanks. works great