3 Replies Latest reply on Sep 26, 2012 12:48 PM by Kevin Parrott

    CS5 error ? Applescript corner effect

    JC6259 Level 1

      Hello to all

       

      I am using a CS2 applescript under CS5 using the compatibility feature version script preference 4.0. Indesign CS5 does not accept the following property when drawing a rectangle

      "corner effect: rounded corner"

      I got the syntax error : Expected “,” or “}” but found identifier.

      This script works fine when used under CS2.

       

      How is it possible to fix this problem?

       

      Thanks

       

      Jean-Claude

        • 1. Re: CS5 error ? Applescript corner effect
          Muppet Mark Level 5

          Corner effect is now a list {} in AppleScript as of CS5 it's possible to set each with differing properties…

          • 2. Re: CS5 error ? Applescript corner effect
            JC6259 Level 1

            Hello Muppet Mark

             

            Thank you for your answer, but changing in a list does not fix the problem, it seems that the word "effect" is not recognized.

             

            set propSS_rond to {corner effect:{rounded corner,rounded corner,rounded corner,rounded corner}, corner radius:5, geometric bounds:{}, fill color:FILL, fill tint:FILL_TINT, stroke weight:1, stroke color:STROKE, stroke tint:STROKE_TINT}


             

             

            If I used the CS5 applescript language as "bottom right corner option", this time it is not recognized as I am working in CS2 compatibility.

             

            Best regards

             

            Jean-Claude

            • 3. Re: CS5 error ? Applescript corner effect
              Kevin Parrott Level 2

              hi

               

              from memory this worked in cs5, and cs5.5

               

              tell application "Adobe InDesign CS6"

                  set myDocument to active document

                  tell myDocument

                      set myRectangle_1 to make rectangle with properties {geometric bounds:{0, 0, 45, 90}, label:"Window"}

                      set {w, x, y, z} to geometric bounds of myRectangle_1

                      move myRectangle_1 by {(w + 20), 55} -- Window Position --

                      set stroke weight of myRectangle_1 to 0.25

                      set the fill color of myRectangle_1 to swatch "None" of myDocument

                     

                      tell myRectangle_1

                          convert shape given convert to rounded rectangle

                      end tell

                     

                  end tell

              end tell