Article View: adobe.scripting.indesign
Article #2611Re: [AS] get a list of the used swatch colours in a document
From: Eric
Date: Thu, 11 Dec 2008 22:08
Date: Thu, 11 Dec 2008 22:08
13 lines
1314 bytes
1314 bytes
Do you mean the actual CMYK values of each color? If so, something like this might work, but it would be incredibly redundant if you have ID naming colors by their CMYK values, lol...
tell application "Adobe InDesign CS3"
tell active document
set colorList to ""
set myColors to name of every color
repeat with thisColor in myColors
set colorList to colorList & (thisColor & ": {C: " & item 1 of color value of color thisColor & ", M: " & item 2 of color value of color thisColor & ", Y: " & item 3 of color value of color thisColor & ", K: " & item 4 of color value of color thisColor & "}" & return) as string
end repeat
display dialog colorList
end tell
end tell
Technical Details
Message-ID:
<59b73c94.6@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!newshub.sdsu.edu!webcrossingReferences:
<C56684EF.4CD9D%sstanley@myriad-com.com.au>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,cda3f5d182e58a01 X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Eric_@_MCA@adobeforums.com Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Re: [AS] get a list of the used swatch colours in a document Message-ID: <59b73c94.6@webcrossing.la2eafNXanI> Date: Thu, 11 Dec 2008 14:08:54 -0800 References: <C56684EF.4CD9D%sstanley@myriad-com.com.au> Lines: 17 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit