4 Replies Latest reply on Aug 6, 2014 4:52 PM by Johnwhite

    Can you change script function?

    Teetan VK Level 1

      Hi, everyone

       

      I got this script:

       

      find-change EN to EM in the cells

      but only in active document

       

      //=======================================================================================

       

      var doc = app.activeDocument,  
        _tables = doc.stories.everyItem().tables.everyItem().getElements();

      app.findGrepPreferences = app.changeGrepPreferences = null; 

      for(var i=0;i<_tables.length;i++)
      {
              app.findGrepPreferences.findWhat = "~=";
              app.changeGrepPreferences.changeTo="~_";
              _tables[i].changeGrep();
          }

      app.findGrepPreferences = app.changeGrepPreferences = null;

       

       


      //=======================================================================================

       

      I want it function in all open documents

       

      thanks

       

      Teetan