0 Replies Latest reply on Dec 4, 2014 4:14 PM by VeluVK

    add tab dots

    VeluVK Level 1

      Hi,

       

      I am in new to scripting; i need the leader dots in every first column of all the tables.

       

      Please correct my code.

       

       

      var myTable = app.activeDocument.stories.everyItem().tables.everyItem().getElements();    

      for(t=0; t<myTable.length; t++)    

      {   

      var col = myTable[t].columns[0].select();

      var colwidth = columns[0].width();

      app.findGrepPreferences = app.changeGrepPreferences = null;  

      app.findGrepPreferences.findWhat = "(.+)$";  

      found = app.selection[0].findGrep (true);  

      for (i = 0; i < found.length; i++)  

      {  

      found[i].insertionPoints[-1].contents = "\t";

      tabstops[0].position = colwidth - "6pt";       

      }  

      }