Skip to main content
Participant
May 4, 2012
Question

Change overprint of color with Applescript

  • May 4, 2012
  • 1 reply
  • 1318 views

I want to overprint a PMS colors using Applescript. I though if I changed the property of the selected items fill color from (fill overprint:false) to (fill overprint:true) it would work. This doesn't seem to change a thing.

This is the script I am currently using:

script ChangeOverprint

    tell application "Adobe Illustrator"

       

        local docRef

        set docRef to current document

       

        tell docRef

            set fileName to name of docRef

            log fileName

           

            set pathItemProperties2 to properties of (path item 2 of layer 1 of docRef)

           

            set fill overprint of pathItemProperties2 to true

            log pathItemProperties2

           

            set pathItemProperties3 to properties of (path item 3 of layer 1 of docRef)

            log pathItemProperties3

        end tell

       

    end tell

   

end script

-- to test

run ChangeOverprint

This is the picture of a simple document I created. The elipse has fill overprint:true. The polygon has filr overprint:false. The original value for the property fill overprint was false. I changed it in the script to true. Which the log shows it changed.

Thanks

Rich

This topic has been closed for replies.

1 reply

Inspiring
May 4, 2012

I would say you have a docRef too many… No need to state to document inside to the tell document… You can't have doc of doc… Try… Layer 1 should be defaut if only one layer…

script ChangeOverprint

          tell application "Adobe Illustrator"

                    local docRef

                    set docRef to current document

                    tell docRef

                              set fill overprint of path item 2 to true

                              set fill overprint of path item 1 to true

                    end tell

          end tell

end script

-- to test

run ChangeOverprint