Article View: adobe.scripting.indesign
Article #15702Re: Unicode character in a comparison (2.0.2 AS)
From: Shane_Stanley
Date: Fri, 21 Nov 2003 02:25
Date: Fri, 21 Nov 2003 02:25
43 lines
2790 bytes
2790 bytes
On Nov 21, 2003, at 9:36 AM, Gilles Le Pors wrote:
> I didn't explain myself correctly. My problem is that if I use the
> "Insert Glyph" palette to add an ornament character to my document,
> copy and paste it in the "Find What" field of the "Find/Change" dialog
> box, InDesign displays the number 3 in the field and finds both the
> ornament and the number in the text. If I use Applescript to search
> for "<E00D>", the script doesn't find the ornament character� unless I
> have previously inserted the character using Applescript.
>
> Do you (or anyone else) know anything about it? (provided that what I
> wrote makes sense).
Yes, I see the problem now, which is not really a scripting problem I
guess. We may need to drag someone like Tom Phinney over here to
answer.
Anyway, I switched to Adobe Caslon Pro and tried what you said, and
indeed the character is listed in the palette as x0033. Odd, and I
can't explain it. Same thing in CS, although there I see a "3" appear
in the story for a fraction of a second before turning into the
ornament.
In CS I used AppleScript to get the properties of the ornament and a
"3". There's a difference: a new-to-CS property called "open type
features". For the "3" it returns {} and for the ornament it returns
{1.869770349E+9, 1}. I don't have a clue what this property means --
the documentation says it's a "list of long" describing "open type
features". Ole or Alan?
Anyway, that means there's a workaround in CS, although "open type
features" doesn't seem to be exposed to the search command. You could,
however, use a whose clause: 'every character whose contents = "3" and
open type features = {1.869770349E+9, 1}'. No help with 2.0.2, but
maybe something to look forward to in CS.
(Thomas: this is all at
<http://www.adobeforums.com/cgi-bin/webx?13@@.2cce67ca/1> if you have a
chance to take a look.)
--
Shane Stanley <sstanley@myriad-com.com.au>
Technical Details
Message-ID:
<04103107-1BCA-11D8-9FBD-003065D61B90@myriad-com.com.au>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!t-online.de!webxReferences:
<2cce67ca.-1@webx.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f939a,99b09d14135470c X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-11-20 18:38:02 PST From: Shane_Stanley@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: Re: Unicode character in a comparison (2.0.2 AS) Message-ID: <04103107-1BCA-11D8-9FBD-003065D61B90@myriad-com.com.au> Date: Thu, 20 Nov 2003 18:25:47 -0800 References: <2cce67ca.-1@webx.la2eafNXanI> Lines: 48 Cc: Thomas Phinney <tphinney@adobe.com> X-Mailer: Apple Mail (2.606) MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit