Article View: adobe.scripting.indesign
Article #19701How to remove multiple occurrences from a list? [AS]
From: Shane Stanley
Date: Mon, 25 Nov 2002 07:41
Date: Mon, 25 Nov 2002 07:41
24 lines
1574 bytes
1574 bytes
in article 1de6be8f.-1@WebX.la2eafNXanI, Richard Ronnback wrote: > Sometimes when I am using lists I would like to remove items that occurs more > than once. For example, the example below will return more than one text flow > if I the layer contains linked text frames > > set myLayerStories to parent story of text frames of layer 1 of active > document > > How do you "wash" a list so that identical items only appear once? With some tedium, looping through and doing comparisons. But why not let ID do the work for you: tell application "InDesign 2.0.1" tell layer 1 of active document set myLayerStories to parent story of text frames whose text frame index = 1 end tell end tel l -- Shane Stanley, sstanley@myriad-com.com.au
Technical Details
Message-ID:
<BA081F5B.452BA%sstanley@myriad-com.com.au>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-06!sn-xit-01!sn-xit-08!supernews.com!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1de6be8f.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,5af732cb4a184874 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2002-11-25 00:07:41 PST From: Shane Stanley <sstanley@myriad-com.com.au> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-06!sn-xit-01!sn-xit-08!supernews.com!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: How to remove multiple occurrences from a list? [AS] Message-ID: <BA081F5B.452BA%sstanley@myriad-com.com.au> Date: Sun, 24 Nov 2002 23:41:32 -0800 References: <1de6be8f.-1@WebX.la2eafNXanI> Lines: 30 User-Agent: Microsoft-Outlook-Express-Macintosh-Edition/5.0.6 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit