2 Replies Latest reply on Jun 20, 2012 6:45 AM by Learner X

    Apply Color in arrays

    Learner X Level 1

      Hi all,


      I am new to script. While working on CS3 scripting Guide i am creating a new paragraph style and apply all the properties like fontsize, fontstyle, fillcolor, filltint etc.... But in fillColor suppose i am using the name like (red, cyan etc) it works, but if i use like [100, 0, 0, 0] it not works.  See the fifth line FYI.


      Where i did a mistake.


      1. var myDocument = app.activeDocument;

      2. var myPstyle = myDocument.paragraphStyles.add({name: "H1"});

      3. myPstyle.pointSize = 18;

      4. myPstyle.fillColor = "red";


      5.  //myPstyle.fillColor = [15, 100, 100, 0];



      And one more doubt.


      For Creating New ParagraphStyle:



      For Creating New CharacterStyle:




      Is it correct:


      For Creating Swatches:




      Thanks in advance. Again for your remembrance i am a learner in scipt.