2 Replies Latest reply on Jan 26, 2011 6:11 AM by [Jongware]-9BC6tI

    [JS/CS4] What's up with the Stroke Styles?

    [Jongware]-9BC6tI Level 4

      Pondering the possibilities of Marc Autret's fantastic ScriptUI Image Injection trick (

      get swatches in dropdown list with color preview... ) I wondered if it was possible to do something a bit more complicated -- a Stroke Style dropdown, with a custom image per stroke style (dashed, dotted, striped), just like the Real Thing. But ... I'm stopped dead in my tracks by one simple nagging problem. Where did the stroke styles go?

       

      According to my documentation, both Application and Document should have a strokeStyles property, listing all of the available stroke types, and separated dashedStrokeStyles, dottedStrokeStyles, and stripedStrokeStyles properties, to gain access to each of the separate types. However, *all* styles report their length  as "18" and can give me their names but nothing else (dashArray, for example, fails on non-dashed strokes and returns nothing at all for the dashed ones). And the separate lists all seem to have a length of 0. And all of the strokes' "strokeStyleType" ought to return a useful descriptor name but return "" (empty string) instead.

       

      alert (app.strokeStyles.length); // 18
      alert (app.stripedStrokeStyles.length); // 0!
      alert (app.dashedStrokeStyles.length); // 0!
      alert (app.dottedStrokeStyles.length); // 0!

       

      Is this my InDesign Gone Bad?