🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #16453

Replacing returns via AppleScript results in fatal error

#16453
From: tkuypers
Date: Thu, 04 Sep 2003 16:53
27 lines
3519 bytes
<FONT FACE="Verdana"><SPAN STYLE='font-size:12.0px'>HELPPPPPP<BR>
<BR>
I&#8217;m trying to cleanup some text in an InDesign layout, like double spaces and a space at the beginning of a new paragraph.<BR>
<BR>
One of the things I need to get rid of is a run or 3 returns after each other.<BR>
<BR>
&nbsp;</SPAN></FONT><FONT COLOR="#FF0000"><FONT SIZE="2"><FONT FACE="Geneva"><SPAN STYLE='font-size:10.0px'><B>tell</B></SPAN></FONT></FONT></FONT><FONT SIZE="2"><FONT FACE="Geneva"><SPAN STYLE='font-size:10.0px'> <FONT COLOR="#0000FF">application</FONT> &quot;InDesign 2.0.2&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR="#FF0000"><B>set</B></FONT> <FONT COLOR="#408000">myDocument</FONT> <FONT COLOR="#FF0000"><B>to</B></FONT> <FONT COLOR="#0000FF">active document<BR>
</FONT> &nbsp;&nbsp;&nbsp;<FONT COLOR="#FF0000"><B>set</B></FONT> <FONT COLOR="#0000FF">find preferences</FONT> <FONT COLOR="#FF0000"><B>to</B></FONT> <FONT COLOR="#0000FF">nothing<BR>
</FONT> &nbsp;&nbsp;&nbsp;<FONT COLOR="#FF0000"><B>set</B></FONT> <FONT COLOR="#0000FF">change preferences</FONT> <FONT COLOR="#FF0000"><B>to</B></FONT> <FONT COLOR="#0000FF">nothing<BR>
</FONT> &nbsp;&nbsp;&nbsp;<FONT COLOR="#FF0000"><B>tell</B></FONT> <FONT COLOR="#408000">myDocument<BR>
</FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR="#FF0000"><B>set</B></FONT> <FONT COLOR="#408000">vSearch</FONT> <FONT COLOR="#FF0000"><B>to</B></FONT> <FONT COLOR="#0000FF">return</FONT> &amp; <FONT COLOR="#0000FF">return</FONT> &amp; <FONT COLOR="#0000FF">return<BR>
</FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR="#FF0000"><B>set</B></FONT> <FONT COLOR="#408000">vReplace</FONT> <FONT COLOR="#FF0000"><B>to</B></FONT> <FONT COLOR="#0000FF">return</FONT> &amp; <FONT COLOR="#0000FF">return<BR>
</FONT> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT COLOR="#0000FF">search</FONT> <FONT COLOR="#0000FF">for</FONT> <FONT COLOR="#408000">vSearch</FONT> <FONT COLOR="#0000FF">in</FONT> <FONT COLOR="#0000FF">active document</FONT> <FONT COLOR="#0000FF">replacing with</FONT> <FONT COLOR="#408000">vReplace<BR>
</FONT> &nbsp;&nbsp;&nbsp;<FONT COLOR="#FF0000"><B>end</B></FONT> <FONT COLOR="#FF0000"><B>tell<BR>
end</B></FONT> <FONT COLOR="#FF0000"><B>tell<BR>
</B></FONT><BR>
</SPAN></FONT></FONT><FONT FACE="Verdana"><SPAN STYLE='font-size:12.0px'>But when I execute this script, InDesign &#8220;unexpectedly quit&#8221;...<BR>
<BR>
I can replace with any other char, but when replacing to a return the fun is over :-(<BR>
<BR>
Does anyone have the same problem and (more important) is there another way to get this done using AppleScript?<BR>
<BR>
Warm regards,<BR>
<BR>
Ton Kuypers</SPAN></FONT>
Technical Details
Message-ID: <BB7D3ABA.D0AD%tkuypers@pandora.be>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!webx

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,8719946c823bc3cc,start
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-09-04 10:08:01 PST
From: "tkuypers@pandora.be" <tkuypers@pandora.be>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!webx
Newsgroups: adobe.scripting.indesign
Subject: Replacing returns via AppleScript results in fatal error
Message-ID: <BB7D3ABA.D0AD%tkuypers@pandora.be>
Date: Thu, 4 Sep 2003 09:53:46 -0700
Lines: 54
User-Agent: Microsoft-Entourage/10.1.4.030702.0
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit