Article View: adobe.scripting.indesign
Article #17688Re: AS - character style to part of text
From: Fernando G. Jensen
Date: Fri, 23 May 2003 09:35
Date: Fri, 23 May 2003 09:35
18 lines
1580 bytes
1580 bytes
Thanks for your help, Dave and Jay.
Inspired by Dave's script i wrote/borrowed this:
tell application "InDesign 2.0.2"
set find preferences to nothing
set change preferences to nothing
with timeout of 100 seconds
search active document with find attributes {find text:" ^p"} with change attributes {change text:"" & return}
end timeout
end tell
The "funny" thing with this script is that it worked while creating and testing it, but on the last test it crashed InDesign, and has done so ever since. The line "{change text:"" & return}" does only work if "" contains a character (a, b, c) but not a metacharacter (^p, ^n) or a (�). I've tried {change text:return & ""}, {change text:nothing} and {change text:""} with same crashing effect.
Weird? or logic?
Thanks
Fernando
Technical Details
Message-ID:
<1de9362f.4@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!border3.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed.freenet.de!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1de9362f.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f939a,241a499cbd123cfa X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-05-23 02:40:10 PST From: "Fernando G. Jensen" <fgj@eniro.dk> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!border3.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed.freenet.de!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: AS - character style to part of text Message-ID: <1de9362f.4@WebX.la2eafNXanI> Date: Fri, 23 May 2003 02:35:53 -0700 References: <1de9362f.-1@WebX.la2eafNXanI> Lines: 24 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit