8 Replies Latest reply on Aug 25, 2016 8:19 AM by heatherb555

    Display file on screen when processing book

    heatherb555 Level 1

      Hi everyone,

       

      I am working on a complex script to search and replace certain terms. In essence, it searches for the offensive term, shows it on the screen in the file and gives you a dialog box with a suggested edit. Everything works great, but when I'm processing a book, it doesn't pull up the found text range and display it on screen. If you run the script on just a single file, it works great and you can see the offensive term in context. But if you run it on the book and progress your way through the chapters, the file displayed on screen never changes. I know it's running because the display line at the bottom of the book window lists the file it's checking. It just would be nice for users to see the context of the offensive term.

       

      I've tried calling ScrollToText and Redisplay just after finding the term and neither have any effect. I'm guessing that the focus is on the book and that prohibits the focus to switch to the file?

       

      Any ideas or suggestions of things to try would be very much appreciated. I have scoured the scripting guide, and it's too obscure for a generic Google search to find anything.

       

      With appreciation,

      Heather Ayer