Article View: adobe.scripting.indesign
Article #15459[Help] "Can't get character 1 of..." error
From: Dan_Delaney
Date: Wed, 03 Dec 2003 16:39
Date: Wed, 03 Dec 2003 16:39
23 lines
1797 bytes
1797 bytes
Hi all. I'm debugging one of the scripts in the Studio scripting library that works in InDesign 2 but not in CS. I fixed a few things, but this one has me stumped. It's working on a small range of selected characters in a text box (in this case, characters 20 thru 21).
After the following stagement...
set KernTextBefore to object reference of characters (fSlash - 1) through fSlash of PStory
...here's what I get in the Event Log:
get object reference of characters 20 thru 21 of story id 136 of document "Untitled-1"
{text from character 20 to character 20 of text flow id 136 of document "Untitled-1", text from character 21 to character 21 of text flow id 136 of document "Untitled-1"}
Then with this statement:
set (kerning value of character 1 of KernTextBefore) to KPvalue
...I get the following error:
"Can't get character 1 of {text from character 20 to character 20 of text flow id 136 of document \"Untitled-1\" of application \"InDesign CS\", text from character 21 to character 21 of text flow id 136 of document \"Untitled-1\" of application \"InDesign CS\"}."
Again, this seems to be working in InDesign 2, but not InDesign CS. Any ideas?
Thanks
--Dan
Technical Details
Message-ID:
<2cceb626.-1@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webxShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,bd2e54fcae72c1c9,start X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-12-03 09:08:05 PST From: Dan_Delaney@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: [Help] "Can't get character 1 of..." error Message-ID: <2cceb626.-1@webx.la2eafNXanI> Date: Wed, 3 Dec 2003 08:39:24 -0800 Lines: 34 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit