Article View: adobe.scripting.indesign
Article #646Re: [CS3 JS] Question about collecting overridden style settings
From: Andreas_Jansson
Date: Wed, 11 Mar 2009 16:49
Date: Wed, 11 Mar 2009 16:49
28 lines
1632 bytes
1632 bytes
Hi!
My script now works fine with fresh data...
But making a new override (manually), such as colorizing a couple of letters red, in a paragraph with an already applied auto-generated paragraph style
... and running the script again, then the script enginge / InDesign no longer accepts that my code tries to use the properties collection of the StyleRange object.
The result is a crashing appliction.
The context of the error is this:
for (var iTSR=srs.length-1; iTSR>=0; iTSR--){
var sr = srs[iTSR];
if (sr.styleOverridden){
var srProps = sr.properties;
...
I really need to solve this so I hope that someone else has ancountered a similar problem and knows the cause and a workaround.
How can it be that the properties collection of the StyleRange suddenly is not available and crashes InDesign?
Best regards,
Andreas
( InDesign crashes " at location 0x78138aa0 ".
AppName: indesign.exe AppVer: 5.0.4.682 ModName: text.rpln
ModVer: 5.0.4.682 Offset: 00182bbb )
Technical Details
Message-ID:
<59b81cad.10@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!newshub.sdsu.edu!webcrossingReferences:
<59b81cad.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,ae48fa806cc37e1a X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Andreas_Jansson@adobeforums.com Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Re: [CS3 JS] Question about collecting overridden style settings Message-ID: <59b81cad.10@webcrossing.la2eafNXanI> Date: Wed, 11 Mar 2009 09:49:30 -0700 References: <59b81cad.-1@webcrossing.la2eafNXanI> Lines: 30 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit