Article View: adobe.scripting.indesign
Article #9353Re: extended toolkit doubt
From: Olav_Kvern
Date: Tue, 05 Sep 2006 17:24
Date: Tue, 05 Sep 2006 17:24
11 lines
1347 bytes
1347 bytes
Hi priyan, AddGuides.jsx will generate an error when the document you're working with does not contain a particular layer. That's normal, and there's nothing wrong with the script. When the script is run from the Scripts palette, error handling in the script takes care of the error; when you're running it from the ExtendScript Toolkit (ESTK), you should just click No when the error message appears (that is, *don't* let the ESTK handle the error). If you click Yes, then the layer will not get created and the script will generate a real error when it tries to assign a guide to the layer. Take a look at the try...catch statement that creates the layer if it does not already exist, and you'll see how it works. Thanks, Ole
Technical Details
Message-ID:
<3bc187a2.13@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news1.google.com!news.germany.com!news.motzarella.org!news.isoc.lu!webcrossingReferences:
<3bc187a2.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,d989bab30f600d02 X-Google-Attributes: gidf939a,public X-Google-Language: ENGLISH,ASCII-7-bit From: Olav_Kvern@adobeforums.com Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news1.google.com!news.germany.com!news.motzarella.org!news.isoc.lu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Re: extended toolkit doubt Message-ID: <3bc187a2.13@webcrossing.la2eafNXanI> Date: Tue, 5 Sep 2006 10:24:08 -0700 References: <3bc187a2.-1@webcrossing.la2eafNXanI> Lines: 19 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit