4 Replies Latest reply on Mar 30, 2012 2:08 AM by michael.shen

    unterminated string constant

    michael.shen Level 1

      hi guys,

      i run the below code , but got the error: unterminated string constant

       

       

      script = '';

      script += "var docRef = app.documents.add(800,600, 300);\n";

      script += "var myLayer8 = docRef.artLayers.add();\n";

      script += "myLayer8.kind = LayerKind.TEXT;\n";

      script += "myLayer8.textItem.font='FolioBT-BoldCondensed';\n";

      script += "myLayer8.textItem.size='15.1848010253906 pt';\n";

      script += "var textColor8 = new SolidColor;\n";

      script += "textColor8.rgb.hexValue = '000000';\n";

      script += "myLayer8.textItem.color = textColor8;\n";

      script += "myLayer8.textItem.contents = 'saturda \r rad';\n";

       

       

      var bt = new BridgeTalk();

      bt.target = "photoshop";

      bt.body = script;

      bt.send();

       

      my contents have a "\r" , how should I to do it ?

      thanks.