6 Replies Latest reply on Jun 11, 2015 6:52 AM by FredrikM

    Set blend mode and opacity of InDesign CC layer with AppleScript

    FredrikM

      I really need to set specific opacity and blend mode when creating a new layer in InDesign with my applescript but i just can't figure this one out.

       

      This line gives me a new layer without problems.

       

      make new layer at beginning of document 1 with properties {name:StatusLayer}


      i have tried to add the specs in the same line like this.


      make new layer at beginning of document 1 with properties {name:StatusLayer, blending settings:{blend mode:multiply, opacity:50}}


      But i'll get my new layer with the default settings.


      If i try this


      make new layer at beginning of document 1 with properties {name:StatusLayer}

      set the opacity of blending settings of transparency settings of layer StatusLayer of document 1 to 50

      set the blend mode of blending settings of transparency settings of layer StatusLayer of document 1 to multiply


      i will get this error message

      Can not set opacity of blending settings of transparency settings of layer "Statuslager" of document 1 som 50.

       

      How should the command for setting the Opacity and blend mode for a layer look to work properly, i'm stuck and have tried for hours!