Article View: adobe.scripting.indesign
Article #18097Re: Delete text/runin problem
From: Kari Puikkonen
Date: Sat, 19 Apr 2003 13:41
Date: Sat, 19 Apr 2003 13:41
42 lines
1825 bytes
1825 bytes
People, Since my script affects to every paragraph, I made an another one that affects only to the chosen paragraph(s): --Deletes empty spaces at the beginning of the chosen paragraph. tell application "InDesign 2.0.2" set paraStyle to "BodyText" -- name of paragraph style you want to affect set theStories to object reference of stories of document 1 repeat with theStory in theStories try set theParaStyles to name of applied paragraph style of object reference of paragraphs of theStory repeat with x from 1 to count of theParaStyles if paraStyle = contents of item x of theParaStyles then applyRunin(x, theStory) of me end if end repeat end try end repeat end tell on applyRunin(paraNum, storyRef) tell application "InDesign 2.0.2" repeat set theDeleteCharacter to character 1 of paragraph paraNum of storyRef if theDeleteCharacter is equal to space then delete character 1 of paragraph paraNum of storyRef else exit repeat end if end repeat end tell end applyRunin Kari
Technical Details
Message-ID:
<1de8a741.11@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1de8a741.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,fb1e447d7f4ef9dc X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-04-19 07:07:30 PST From: "Kari Puikkonen" <kari.puikkonen@welho.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: Delete text/runin problem Message-ID: <1de8a741.11@WebX.la2eafNXanI> Date: Sat, 19 Apr 2003 06:41:07 -0700 References: <1de8a741.-1@WebX.la2eafNXanI> Lines: 42 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit