3 Replies Latest reply on Nov 1, 2013 1:47 PM by smallette

    Deleting characters in a simple script


      I have a simple script where I use a paragraph return and a % to indicate which lines I want to convert to a certain Applied Paragraph style. I'd like to remove the paragraph style and % adterwards. Here is the relevant part of my script so far (it contains A LOT of other find and replace functions:


      //Set the find options.

      app.findChangeTextOptions.caseSensitive = true;

      app.findChangeTextOptions.includeFootnotes = true;

      app.findChangeTextOptions.includeHiddenLayers = true;

      app.findChangeTextOptions.includeLockedLayersForFind = true;

      app.findChangeTextOptions.includeLockedStoriesForFind = true;

      app.findChangeTextOptions.includeMasterPages = true;

      app.findChangeTextOptions.wholeWord = false;


      //Header Paragraph Style

      app.findTextPreferences.findWhat = "^p%";

      app.changeTextPreferences.appliedParagraphStyle = "Character Header";



      //Remove %

      app.findTextPreferences.findWhat = "^p%";

      app.changeTextPreferences.changeTo = ;



      //Clear the find/change preferences after the search.

      app.findTextPreferences = NothingEnum.nothing;

      app.changeTextPreferences = NothingEnum.nothing;


      I don't know what character to use at the end of this line (app.changeTextPreferences.changeTo =) to indicate that I don't want to replace ^p% with anything, just remove it.