Calling the "select()" method might result in what you want.
The following selects a text frame in my test document, and it also shows the page that the object is on, if another page is in view:
(Of course "207050" is a valid id for one of the objects in my open document)
So if you have a result of "found objects", you could possibly juist call the ".select()" method for each object that you would like to set focus to.
Sometimes "Enable redraw" needs to be checked, from the popout menu of the script palette. I'm not sure that's the case here though.
Message was edited by: Andreas Jansson
Hi Mr. Jansson !
First, thanks for your answer. I already select text inside a text frame, I do not select a text frame completely. Maybe it's the reason why my screen don't follow the selected item?<
You need to call a text.showText() method which jumps to this text.
Have you tried:
app.activeWindow.activePage = myPage?
You could set myPage to app.selection.parentTextFrames.parentPage
I'll reply to you all soon, thanks for your answers ! My script is running right now and I can't stop in the middle.
Showing what the script does slows it down incredibly. Why not add a simple progress bar?