3 Replies Latest reply on May 20, 2010 5:05 AM by seb400

    FindChangeByList - Javascript Error!

    seb400 Level 1

      I've been experimenting with the above script, developing a .txt file to perform a host of text/GREP searches.

      I'm sure that the last time I used the script it functioned perfectly well. Today I ran the script and it came up with the following error.

       

      Would someone be able to point me in the right direction to try and find what's amiss?

      error.png

       

      MTIA Steve

       

      OSX 10.5.8 Intel Core 2 Duo, 2.16 Ghz

        • 1. Re: FindChangeByList - Javascript Error!
          [Jongware] Most Valuable Participant

          This is not the actual error, but because the script in "myString" has been called by .doScript, ID cannot display the actual error message.

           

          Can you run the script without using .doScript? It should be possible; this is just a wrapper, to be able to "Undo" the entire called script in one swell foop. Running the script directly will give the actual error message, together with its line number.

          • 2. Re: FindChangeByList - Javascript Error!
            Olav Martin Kvern Level 3

            Hi seb400,

             

            Is it possible that the definitions file has gotten saved with a different encoding or line endings than the most recently-working version?

             

            You can send me your text file directly, if you like, and I can try to figure out what's wrong.

             

            Thanks,

             

            Ole

            • 3. Re: FindChangeByList - Javascript Error!
              seb400 Level 1

              Dear all,

              I hope I haven't wasted your time - I've just discovered the  problem, proving the old adage that 'a little knowledge is a dangerous  thing'.

              I had set up a template file to use as a basis to run and  develop the script. This has all the required paragraph and character  styles resident.

               

              I had forgotten this (getting old!), and was trying  to use an older document reflowed with new text content to run the  script!!!!

               

              Sorry, script runs perfectly on right document!

               

              Steve