3 Replies Latest reply on May 30, 2014 4:34 AM by Stefan Rakete

    How to make this script work

    HarveyLiu Level 1

      Help me to make this script work, please!

       

       

      function(){

      app.findGrepPreferences.firstLineIndent  = "8 mm";

      app.findGrepPreferences.leftIndent  = "8 mm";

      app.changeGrepPreferences.firstLineIndent  = "8 mm";

      app.changeGrepPreferences.leftIndent  = "16 mm";

      app.selection[0].changeGrep();

       

      app.findGrepPreferences.leftIndent  = "16 mm";

      app.changeGrepPreferences.leftIndent  = "24 mm";

      app.selection[0].changeGrep();

       

      }

        • 1. Re: How to make this script work
          hasvi Level 1

          Hi,

           

          Its already replied, see below code:

           

          app.findGrepPreferences = app.changeGrepPreferences = null;

          app.findGrepPreferences.firstLineIndent  = "8 mm";

          app.findGrepPreferences.leftIndent  = "8 mm";

          app.changeGrepPreferences.firstLineIndent  = "8 mm";

          app.changeGrepPreferences.leftIndent  = "16 mm";

          app.changeGrep();

          app.findGrepPreferences = app.changeGrepPreferences = null;

           

          First run the above code, again you want to change leftIndent from '16 mm' to '24 mm' run below code:

          app.findGrepPreferences = app.changeGrepPreferences = null;

          app.findGrepPreferences.leftIndent  = "16 mm";

          app.changeGrepPreferences.leftIndent  = "24 mm";

          app.changeGrep();

          app.findGrepPreferences = app.changeGrepPreferences = null;

           

          by

          hasvi

          • 2. Re: How to make this script work
            HarveyLiu Level 1

            Sorry I am just a newbie of script thing,

            I want run the script like a string, how can make it work?

             

            for example, like a find-change list, I want to write a long list of string,

            but I don't know the syntax

            teach me please!

            • 3. Re: How to make this script work
              Stefan Rakete Level 2

              Have a look at the script "FindChangeByList.jsx" in the InDesign sample scripts

              Stefan