3 Replies Latest reply on Aug 19, 2011 12:39 PM by Muppet Mark

    when I create a new polygon with applescript in in design cs4, I want to make a drop shadow

    filgu74

      when I create a new polygon with applescript in in design cs4, I want to make a drop shadow

      Is it possible?

      I am working with MAC OS 10.6.7 and CS4

      Can somebody help me?

        • 1. Re: when I create a new polygon with applescript in in design cs4, I want to make a drop shadow
          S Hopkins Adobe Community Professional

          Here is a sample script you could modify. It was written for CS5.5 and creates a rectangle instead of a polygon. The property settings for drop shadow are self-explanatory. I haven't tested this in CS4, but the settings should be the same.

           

          (*Drop Shadow

          Creates a rectangle with a drop shadow. Assumes a document exists with measurements set to points and swatch "C=0 M=0 Y=100 K=0."*)

           

          tell application "Adobe InDesign CS5.5"

          set pageRef to page 1 of document 1

          set rectProps to {fill color:"C=0 M=0 Y=100 K=0", geometric bounds:{36, 36, 144, 144}}

          tell pageRef

          set rectRef to make rectangle with properties rectProps

          end tell

          tell rectRef

          set properties of fill transparency settings to {drop shadow settings:{mode:drop, distance:10, angle:135, spread:0, blend mode:multiply, opacity:75, honor other effects:false, x offset:7, y offset:7, knocked out:true, use global light:false}}

          end tell

          end tell

          • 2. Re: when I create a new polygon with applescript in in design cs4, I want to make a drop shadow
            filgu7N

            Thanks for your help! it works very well,sorry for my english but iam french!

            Just need some minor correction with fill color below

            I just have to test it with other shapes as polygons, circles...

             

            tell application "Adobe InDesign CS4"

              set pageRef to page 1 of document 1
               
                --set rectProps to {fill color:"C=0 M=0 Y=100 K=0", geometric bounds:{36, 36, 144, 144}}
                -- fill color don't work in cs4 : message "parametre incorrect"
                --set rectProps to {fill color:{swatch:"C=0 M=0 J=100 N="}, geometric bounds:{36, 36, 144, 144}}-- no more message!
                --this don't work the fill color is always "none" and drop shadow does not work with fil color none

              tell pageRef
                    set rectRef to make new rectangle with properties {fill color:"Paper", geometric bounds:{36, 36, 144, 144}}
                    -- this is ok in cs4
                end tell
               
                tell rectRef
                   
                    set properties of fill transparency settings to {drop shadow settings:{mode:drop, distance:10, angle:135, spread:0, blend mode:multiply, opacity:75, honor other effects:false, x offset:7, y offset:7, knocked out:true, use global light:false}}
                   
                end tell
               
            end tell
            -- this works perfectly

            • 3. Re: when I create a new polygon with applescript in in design cs4, I want to make a drop shadow
              Muppet Mark Level 5

              Adding a drop shadow should work fine regardless of shape… As Im a big fan of using styles everywhere I can…

               

              tell application "Adobe InDesign CS5"

              activate

              tell the active document

               

              set GotNoStyle to make new object style

               

              set properties of drop shadow settings of fill transparency settings of GotNoStyle to ¬

              {mode:drop, distance:3, angle:135, spread:0, blend mode:multiply, opacity:50, honor other effects:true, x offset:3, y offset:3, knocked out:true, use global light:false}

               

              set SomeFill to the last swatch

               

              tell the first page

               

              make new rectangle with properties ¬

              {fill color:SomeFill, geometric bounds:{10, 10, 30, 30}}

              apply object style (the result) using GotNoStyle without clearing overrides

               

              make new oval with properties ¬

              {fill color:SomeFill, geometric bounds:{10, 40, 30, 70}}

              apply object style (the result) using GotNoStyle without clearing overrides

               

              end tell

               

              end tell

              end tell

               

               

              You can then edit the object style to make global changes… Sorry my values were for my euro metric head…