5 Replies Latest reply on Sep 28, 2010 8:53 AM by [Jongware]

    After upgrade Script No Longer Works

    robert_underwood Level 1

      After I upgraded CS4 to .605 my script no longer works. I get:

      Error Number:45

      Error String: Object is Invalid

      Line 12

      Source: myParStyle.baselineshift = -1;

       

      Here are my first 12 lines:

      var doc = app.documents[0]
      var color = doc.colors.item("C=100 M=65 Y=0 K=0");
      var inlines = doc.stories.everyItem().textFrames.everyItem().getElements();
      for(var i=0;i<inlines.length;i++){
          if (inlines[i] instanceof Group){continue}
          if(inlines[i].fillColor != color){continue}
          if(inlines[i].contents == ""){continue}
          inlines[i].convertShape(ConvertShapeOptions.CONVERT_TO_RECTANGLE);
          myChangeCorners(inlines[i], 0, .3, "fourth point");
      }
      var myParStyle = doc.paragraphStyles.item("Tab_HeadB_KO");
      myParStyle.baselineShift = -1;

       

      What do I need to change to get this to work again?

      Thanks,

      Rob