🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #20075

Search/replace -> Unexpected Quit

#20075
From: Peter W�rn
Date: Wed, 06 Nov 2002 15:58
31 lines
1866 bytes
I�m having huge problems with search/replace and AppleScript. Works fine on some documents and then InDesign just quits when trying on similar documents. All created from same master document. 
In some cases it makes a difference what I'm searching for or replacing with. 

Example - this doesn�t work 

tell application "InDesign 2.0.1" 
	activate 
 set theDocument to active document 
 set find preferences to nothing 
 set change preferences to nothing 
	search for "qqqptr" in theDocument replacing with " " 
end tell 

but this does! 

tell application "InDesign 2.0.1" 
	activate 
	set theDocument to active document 
	set find preferences to nothing 
	set change preferences to nothing 
	search for "qqqptr" in theDocument replacing with "xxx" 
end tell 

Works fine as long as I don't replace with " ". 
It seems to me that I'm having more problems with XML tags than other strings that's why I clean up the text as much as possible in Tex-Edit Plus before importing and handling in InD. 

I'm using Swedish InD 2.0.1 & OS X (10.2.1), also tried on other machines & MacOS 9.2. 

Any suggestions appriciated. 

/Peter
Technical Details
Message-ID: <1de67b0b.-1@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-04!supernews.com!newsfeed.gamma.ru!Gamma.RU!newsfeed-east.nntpserver.com!nntpserver.com!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f939a,3b5006219fe32cc,start
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2002-11-06 08:12:33 PST
From: "Peter W�rn" <peter.warn@gothia.se>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-04!supernews.com!newsfeed.gamma.ru!Gamma.RU!newsfeed-east.nntpserver.com!nntpserver.com!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Search/replace -> Unexpected Quit
Message-ID: <1de67b0b.-1@WebX.la2eafNXanI>
Date: Wed, 6 Nov 2002 07:58:35 -0800
Lines: 37
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit