2 Replies Latest reply on Oct 22, 2009 12:45 AM by ChocoboKnight

    Check of paragraph text is bold or Italic [JS] CS3




      i'm trying to write a script to check a document paragraph my paragraph and change the text to leading 8 and point size if it is not bold or Italic. The problem i'm having is trying to retrun a value which i can used to find out of the paragraph text is bold and or Italic.


      Does anyone know how to do this?


      here's what i have so far;


      var the_document = app.documents.item(0);
      var the_story = app.selection[0].parentStory;

      counter = 0;

        var current_paragraph = the_story.paragraphs.item(counter)

         var mytextobject = current_paragraph.texts.firstItem();
         mytextobject.leading = 8;
         mytextobject.pointSize = 7;
      }while (counter < the_story.paragraphs.length);