1 Reply Latest reply on Mar 28, 2012 4:12 AM by Muppet Mark

    text layer using scripting need help.

    michael.shen Level 1


      i'm new in scripting. now i want to use scripting to create a text layer,but i don't know how to set some properties, does anyone can help me.

      please see my code below:


      var myLayer1 = docRef.artLayers.add();

      myLayer1.kind = LayerKind.TEXT;



      myLayer1.textItem.size='26.3203234863281 pt';

      var textColor1 = new SolidColor;

      textColor1.rgb.hexValue = 'FAF9EF';

      myLayer1.textItem.color = textColor1;

      myLayer1.textItem.contents = 'madison';


      docRef.activeLayer.translate(1120.0000000, 649.0000000);



      now i want to set justification , bounds.


      another question is if my text has "\n" how to do?