7 Replies Latest reply on Nov 24, 2010 1:29 AM by zevendesign

    [AS] Script not working - need help

    zevendesign Level 1

      I have tried every way possible to create a swatch and then use it as the fill color of a selection but no matter what I try, it doesn't work. Here's my latest attempt:

       

      tell application "Adobe InDesign CS5"
          set wiilibrary to library "Wii template.indl"
          set myDocument to active document
          set mycolorindicator to place asset asset "spine lang indicator" of wiilibrary on myDocument
          set mySelection to select mycolorindicator
          set mySelection to selection
          set mySpread to active spread of active window
          set myPageItem to item 1 of mySelection
          set colorname to "English3"
          set languagevalue to {0, 10, 10, 10}
          set colorTest to name of colors
         
         
          set New_Swatch to make color with properties {name:colorname, color:CMYK, color value:languagevalue, model:process}
          set fill color of myPageItem to New_Swatch
         
      end tell

       

      Error I get is:

      error "Adobe InDesign CS5 got an error: Invalid value for set property 'fill color'. Expected swatch or string, but received color." number 30477