🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #18916

InD crashes while trying to replace text via AS

#18916
From: Karsten
Date: Sat, 01 Feb 2003 20:12
10 lines
1617 bytes
I'm trying to replace an old date (dd.mm.yy) with the current date vie AS. (In the script below I've replaced the current-date-data with the expression �DateOfToday�, because the way, the current date is described is not the matter here). The RegEx-AS-Scripting Addition (OS 9) is installed to get access to regex-search/replace-patterns.
    While running the script the result window displays the proper replacement in the text that has been stored in �content�. But if I'm running the script with the second line activated InD crashes�



tell application "InDesign 1.5.2"
  --REReplace text of text frame 1 of document 1 pattern "\\d\\d\\.\\d\\d\\.\\d\\d" with "DateOfToday"
  set content to text of text frame 1 of document 1
  REReplace content pattern "\\d\\d\\.\\d\\d\\.\\d\\d" with "DateOfToday"
end tell
Technical Details
Message-ID: <1de7a795.-1@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!38.144.126.75.MISMATCH!feed1.newsreader.com!newsreader.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!skynet.be!skynet.be!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!WebX

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f939a,52425a5537093b7a,start
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-02-01 12:43:41 PST
From: Karsten <mailbox@geisler-design.de>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!38.144.126.75.MISMATCH!feed1.newsreader.com!newsreader.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!skynet.be!skynet.be!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: InD crashes while trying to replace text via AS
Message-ID: <1de7a795.-1@WebX.la2eafNXanI>
Date: Sat, 1 Feb 2003 12:12:43 -0800
Lines: 15
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit