3 Replies Latest reply on Feb 11, 2010 5:39 AM by La0s

    Need help with cleening text during ExportAllStories (JS-CS4)

    La0s

      I have altered the ExportAllStories.jsx script for CS4 to export the selected TextFrame(s).

      The main function are the same as in the original.
      It works fine, but I need advice on how to clean the text before it gets exported to a text file.

       

      I have tried to pass the TextFrame object myStory, as in the original script, to a function like this:

      myStory = cleantext(myStory)

       

      The function cleantext works with a text string passed to it,like this:

      function cleantext(s) {

      s.replace(/\u2011/g,'-');

       

      I guess I have to extract the myStory object to a text string but haven’t succeeded yet.

      Maybe the solution is to do some search and replace with GREP or other techniques?

       

      All tips on how to proceed would be appreciated.