Article View: adobe.scripting.indesign
Article #18944AppleScript: RemoveFrameFromStory
From: Olav Kvern
Date: Wed, 05 Feb 2003 19:44
Date: Wed, 05 Feb 2003 19:44
37 lines
2044 bytes
2044 bytes
Gang-- Several people (on various mailing lists) have asked for a script that makes InDesign work like PageMaker does when you cut/paste a text frame. In InDesign, when you delete a text frame, the text flows into other frames in the story; in PageMaker, the text is deleted with the frame. Here's a simple AppleScript that removes the selected frame or frames from the story. --RemoveFrameFromStory.scpt -- This InDesign 2.x script removes the selected text frame -- and the text it contains from its parent story. The frame -- and its content will appear in the same position as it -- originally occupied--it just won't be threaded to the story -- anymore. This is similar to deleting and then power pasting -- a text block in PageMaker. You can select multiple text frames. tell application "InDesign 2.0.1" set mySelection to selection if (count mySelection) is not equal to 0 then repeat with myCounter from (count mySelection) to 1 by -1 if class of item myCounter of mySelection is text frame then set myTextFrame to item myCounter of mySelection tell myTextFrame duplicate delete characters 1 through -1 of myTextFrame delete end tell end if end repeat end if end tell Thanks, Ole
Technical Details
Message-ID:
<1de7b757.-1@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!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-7-bit X-Google-Thread: f939a,90a1e358828ef553,start X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-02-05 12:07:55 PST From: "Olav Kvern" <okvern@adobe.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: AppleScript: RemoveFrameFromStory Message-ID: <1de7b757.-1@WebX.la2eafNXanI> Date: Wed, 5 Feb 2003 11:44:00 -0800 Lines: 37 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit