2 Replies Latest reply on Jul 19, 2011 11:10 AM by kermy812

    [AS CS5] Tint of spot color to 100% tint of a different spot color

    kermy812

      Need some help writing a applescript - Still somewat new at this...

       

      I need to replace spot color with a different spot color.

       

      I have this in my script:

      try

      set myColorJ to color "CUSTOM_7538" of myDocument

      on error

      set myColorJ to make color with properties {name:"CUSTOM_7538", model:spot, color value:{29, 26, 29, 24}}

      end try

      try

      delete swatch "gray mix" replacing with swatch "CUSTOM_7538"

      end try

       

      However, in some places the are text or element that are tints. So a 75% tint of "gray mix", becomes a 75% tint of "CUST_7538".

      I want the 75% tint of "gray mix" to go to 100% "CUSTOM_7538".

       

      How can I get elements that are 75% tint of spot color to go to a 100% spot of a different color?

      Basically, anything that is 75% gray mix, need to be 100% CUSTOM_7538

        • 1. Re: [AS CS5] Tint of spot color to 100% tint of a different spot color
          kermy812 Level 1

          I figured out how to do text with this:

           

          tell application "Adobe InDesign CS5"

           

          set theDocument to active document

           

          set find frames preferences to nothing

          set change text preferences to nothing

           

          set fill color of find text preferences to swatch "gray mix" of theDocument

          set fill color of change text preferences to swatch "CUSTOM_7538" of theDocument

          set fill tint of change text preferences to 100

           

           

          tell theDocument

          change text

          end tell

          end tell

           

          How would I do objects/All Frames? I can't seem to get the syntax in my script. I thought it would be just changing the word "text" to "object" above, but its not. Any idea anyone? I can't seem to find any examples anywhere.

          • 2. Re: [AS CS5] Tint of spot color to 100% tint of a different spot color
            kermy812 Level 1
            Still havent't figured this out yet...
            I want to change objects that are a 75% "gray mix" to 100% "CUSTOM_7538"
            I thought I had it below, but it is changing everything that is a 75% tint to a 100% tint, whether it is "grey mix" or not.
            Any ideas what's wrong below?

            tell application "Adobe InDesign CS5"

             

             

            set myDocument to active document

             

             

            tell myDocument

            try

            set myColorI to color "CUSTOM_7538" of myDocument

            on error

            set myColorI to make color with properties {name:"CUSTOM_7538", model:spot, color value:{19.77, 24.49, 25.56, 41.59}}

            end try

             

            end tell

             

            set change object preferences to nothing

            set find object preferences to nothing

             

            set include footnotes of find change object options to true

            set include locked layers for find of find change object options to true

            set include hidden layers of find change object options to true

            set include locked stories for find of find change object options to true

            set include master pages of find change object options to true

             

            set object type of find change object options to all frames type

            set properties of find object preferences to {fill tint:75, fill color:"gray mix"}

            set properties of change object preferences to {name:myColorI, fill tint:100}

             

            tell myDocument

            change object

            end tell

             

             

             

             

             

            end tell