Article View: adobe.scripting.indesign
Article #20356Re: Apply character style to chosen characters? (AS)
From: Peter Boctor
Date: Thu, 25 Jul 2002 20:37
Date: Thu, 25 Jul 2002 20:37
18 lines
1428 bytes
1428 bytes
This is another case where the tell block isn't quite right. If you look at the Event Log you'll see the problem right away (The Event Log is under Controls->Open Event Log for Script Editor and Window->Apple Event Log for Script Debugger)
tell document 1
search document 1
end tell
results in the following being sent by AppleScript:
search document 1 of document 1
So change this line:
search document 1 with find attributes {find text:"^9"} with change attributes {applied character style:theStyle}
to this:
search with find attributes {find text:"^9"} with change attributes {applied character style:theStyle}
-peter
Technical Details
Message-ID:
<ef97992.5@WebX.aaQKaf7vad4>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-06!sn-xit-04!supernews.com!iad-peer.news.verio.net!news.verio.net!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<ef97992.-1@WebX.aaQKaf7vad4>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,e7eb9c0f57bd6ad2 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2002-07-25 14:11:25 PST From: "Peter Boctor" <peter.boctor@adobe.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-06!sn-xit-04!supernews.com!iad-peer.news.verio.net!news.verio.net!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: Apply character style to chosen characters? (AS) Message-ID: <ef97992.5@WebX.aaQKaf7vad4> Date: Thu, 25 Jul 2002 13:37:38 -0700 References: <ef97992.-1@WebX.aaQKaf7vad4> Lines: 21 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit