2 Replies Latest reply on Jun 16, 2014 12:47 AM by t1d2c3

    Editing the leading on a created textFrame




      I have no idea why the following code will not work.

      The text displays in the correct place with the correct contents but i cannot get the leading to change.


      var textInfo = app.activeDocument.textFrames.add();

      textInfo.name = "textInfo";

      textInfo.position = [30,-30];

      textInfo.contents = "A";

      textInfo.autoLeading = false;


      for(var i = 0; i<app.activeDocument.textFrames["textInfo"].textRange.characters.length; i++){

          app.activeDocument.textFrames["textInfo"].textRange.characters[i].characterAttributes.lea ding = 18;


          $.writeln(app.activeDocument.textFrames["textInfo"].characters[i].characterAttributes.lea ding);


      I have also tried textInfo.leading = 18; with no luck.

      The write line function at the end is reading the correct leading but the line above is not editing it.

      Adobe illustrator CS6, Mac OS 10.6, Javascript/extendscript


      Also, not too sure what auto leading does so have tried both with and without.