13 Replies Latest reply on Feb 14, 2013 3:40 AM by kerosk_inddNew

    Comparison not Working

    kerosk_inddNew

      Hi All,

       

      I create the script to set the left inset 2pt of table first row first cell if their fill color is Black.

       

      But code is not working (See below code). However, when I change if(rows[0].cells[0].fillColor=="Black") to if(rows[0].cells[0].fillColor!="Black") then its working.

       

      Kindly, let me know what is the problem with the comparison.

       

       

      var myTables=myDoc.stories.everyItem().tables.everyItem().getElements();

       

       

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

      with (myTables[i])

      {

      if(rows[0].cells[0].fillColor=="Black")

      rows[0].cells[0].leftInset="2pt"

      }

       

       

      Thanks in Advance,

      Kerosk