2 Replies Latest reply: Dec 9, 2011 4:31 AM by Haakenlid RSS

    FindChangebyList JavaScript hangs on line 160

    Gary Niemeier Community Member

      Hi, I'm using InDesign CS5.5 on a Mac OS X 10.6 Snow Leopard. In trying to use the "FindChangebyList" Javascript, I'm finding that it hangs on line 160. See screen shot:

       

      Screen shot 2011-12-08 at 1.53.31 PM.png

       

      The following is the text search I've added to the "FindChangeList.txt" document:

       

      text{findWhat:"", appliedParagraphStyle:"C"}{changeTo:"", appliedParagraphStyle:"qin-hed"}{includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}Finds para style "C" and replaces it with para style "qin-hed".

       

      I'm searching for a certain paragraph style and replacing it with another. Should be simple, but the Javascript hangs. I've been careful to add the proper Javascript name to the script ("2parasweep.jsx") and the name of the FindChange text document ("2parasweepList.txt"). The FindChange text doc is inside the "FindChangeSupport" folder and the proper path is indicated in the Javascript.

       

      What's going wrong here?

       

      Gary

        • 1. Re: FindChangebyList JavaScript hangs on line 160
          John Hawkinson CommunityMVP

          (Generally speaking, when a script produces an error, we don't call that a "hang." The word "hang" is reserved for when the program just stops responding with no feedback or error condition.)

           

          I...don't think we have quite enough information to determine the problem. I assume that if you change your findWhat and changeTo strings away from null strings, the problem does not go away? If it does not go away, please upload your two files to http://pastebin.com/ (or otherwise make them available) and post a link here. If it does go away, well, hrmm.

          • 2. Re: FindChangebyList JavaScript hangs on line 160
            Haakenlid Community Member

            I think the error means that changeText() is not possible because findWhat and changeTo is identical. The appliedParagraphStyle might not be valid.

            Are you sure that you spelled the paragraph styles correctly and that they are both paragraph styles, not character styles?