Article View: adobe.scripting.indesign
Article #9023[AS] Merge duplicate swatches
From: Shane_Stanley
Date: Tue, 12 Sep 2006 22:25
Date: Tue, 12 Sep 2006 22:25
18 lines
1762 bytes
1762 bytes
You're going to have to keep track of which ones you merged, something like
this (untested):
set mergedList to {} -- swatches already merged
set myList to every color whose name is not ""
repeat with aColor in myList
if aColor is not in mergedList then -- color still exists
set theValue to color value of aColor
set dupeColors to (every swatch whose color value = theValue)
if length of dupeColors is greater than 0 then
merge aColor with dupeColors
set mergedList to mergedList & dupeColors
end if
end if
end repeat
--
Shane Stanley <sstanley@myriad-com.com.au>
Technical Details
Message-ID:
<C12D70E7.2FA31%sstanley@myriad-com.com.au>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news1.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!news.albasani.net!news.buerger.net!open-news-network.org!news.isoc.lu!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: f939a,d3b8947cced38379 X-Google-Attributes: gidf939a,public X-Google-Language: ENGLISH,ASCII-7-bit From: Shane_Stanley@adobeforums.com Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news1.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!news.albasani.net!news.buerger.net!open-news-network.org!news.isoc.lu!webcrossing Newsgroups: adobe.scripting.indesign Subject: [AS] Merge duplicate swatches Message-ID: <C12D70E7.2FA31%sstanley@myriad-com.com.au> Date: Tue, 12 Sep 2006 15:25:11 -0700 Lines: 21 Received: from bld-mail07.adl2.internode.on.net [203.16.214.71] by adobeforums.com; Wed, 13 Sep 2006 01:48:16 -0700 Received: from [192.168.1.2] (unverified [59.167.87.226]) by mail.internode.on.net (SurgeMail 3.2f) with ESMTP id 43612396 for <adobe.scripting.indesign@adobeforums.com>; Wed, 13 Sep 2006 07:55:14 +0930 (CST) Return-Path: <sstanley@myriad-com.com.au> User-Agent: Microsoft-Entourage/11.2.5.060620 Thread-Topic: [AS] Merge duplicate swatches Thread-Index: AcbWuk9WjhprpUKtEduVKgARJHm3nA== MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit