Article View: adobe.scripting.indesign
Article #20137[AS] Clear all text frames with some properties
From: Olivier Berquin
Date: Fri, 18 Oct 2002 08:03
Date: Fri, 18 Oct 2002 08:03
47 lines
1686 bytes
1686 bytes
Dear fellows scripters, I write this script to clear all text frames with some porperties loop through all frames IF this frame is a text frame AND ((contents is empty) OR (contents = carriage return)) AND fill color is none AND stroke color is none AND text wrap is none THEN delete this frame. Here is the complete script: -- property idCR : " " -- a carriage return tell application "InDesign 2.0.1" set allFrames to all page items of active document repeat with aFrame in allFrames if (class of aFrame is text frame) and � ((contents of parent story of aFrame = idCR) or (contents of parent story of aFrame = "")) and � (name of fill color of aFrame is "None") and (name of stroke color of aFrame is "None") and (text wrap of aFrame is none) then delete aFrame end if end repeat end tell -- Thanks to Shane Stanley Olivier.
Technical Details
Message-ID:
<1de63735.-1@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-04!supernews.com!easynet-quince!mango.news.easynet.net!easynet.net!news.shlink.de!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebXShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f939a,e485897239a4c097 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2002-10-21 03:59:24 PST From: "Olivier Berquin" <ob@microscript.be> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-04!supernews.com!easynet-quince!mango.news.easynet.net!easynet.net!news.shlink.de!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: [AS] Clear all text frames with some properties Message-ID: <1de63735.-1@WebX.la2eafNXanI> Date: Fri, 18 Oct 2002 01:03:02 -0700 Lines: 41 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit