Article View: adobe.scripting.indesign
Article #18548Re: Applescript + Search = Crash
From: Olav Kvern
Date: Mon, 10 Mar 2003 20:22
Date: Mon, 10 Mar 2003 20:22
27 lines
1614 bytes
1614 bytes
Sam-- Any time you do a find/change in AppleScript where the replacement string is shorter than the find string, you run the risk of crashing. It's a known bug, and will be fixed. It doesn't exist on the Windows side at all, so it's something specific to AppleScript. In the meantime, try something like this to replace double-returns (this also avoids the problem of incorrect paragraph style assignment Dave has mentioned elsewhere). tell application "InDesign 2.0.2" tell active document repeat with myStoryCounter from 1 to (count stories) set myParagraphs to object reference of (paragraphs of story myStoryCounter whose contents = return) repeat with myCounter from (count myParagraphs) to 1 by -1 tell item myCounter of myParagraphs to delete end repeat end repeat end tell end tell Who is the "friend at Adobe"? Can I help them? Thanks, Ole
Technical Details
Message-ID:
<1de82a76.6@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1de82a76.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,ee6013b8242493af X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-03-10 12:37:49 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!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: Applescript + Search = Crash Message-ID: <1de82a76.6@WebX.la2eafNXanI> Date: Mon, 10 Mar 2003 12:22:39 -0800 References: <1de82a76.-1@WebX.la2eafNXanI> Lines: 29 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit