Article View: adobe.scripting.indesign
Article #18268Re: Heavy Text scripting
From: Dave Saunders
Date: Fri, 11 Apr 2003 15:45
Date: Fri, 11 Apr 2003 15:45
29 lines
3025 bytes
3025 bytes
John, Solving these problems in the general case can be horrendously difficult. What you need to do is zero-in on the specifics of your situation and ignore everything else. Probably, the best approach -- certainly the one I would use to get started -- is to work through a specific instance and get that to work without paying much heed to solving a broader case. Tricks I've used are: 1. Use document templates to get all the stuff that is messy to define in scripts predefined. Perhaps this won't work for you. I've generally worked on a single series of text books for each of these projects, so I only needed a small number of templates. Usually, I started by opening the right one and placing it in my document and then I'd fire up my scripts. 2. I use a "walk-through" strategy most of the time. This is a hangover from my PageMaker days, but it seems to be quite a good way of working with InDesign. What I mean is: the user clicks in a paragraph. That defines which story to work on and where to start. I then process one paragraph at a time, using its style to determine which script to run and what to do. Each paragraph processor is responsible for moving the cursor to the next paragraph (or changing the paragraph style of the current paragraph and leaving the cursor at the start of it, so it is reprocessed). I'll usually write my control script to check for Caps Lock. If down, keep on trucking, else stop at the end of the paragraph. 3. Use a library to hold templates of design elements (such as tables, inline text frames of particular types). That way, you don't have to write a complicated script to build them, just grab them and populate them. One major thing I learned: don't move such elements inline until you've finished populating them: ID makes a pig's ear of adjusting to resized inline frames. So, if one is inline and you need to resize it for some reason, the best thing to do is take it out of line and then move it back in. By the way, the library comes in handy for this too. It makes it possible to transfer things in and out of line without using copy and paste. Hope this helps. Dave
Technical Details
Message-ID:
<1de8b136.2@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!216.170.153.135.MISMATCH!tdsnet-transit!newspeer.tds.net!out.nntp.be!propagator2-sterling!propagator-sterling!news-in-sterling.newsfeed.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1de8b136.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,735c1564e79c86ce X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-04-11 09:10:17 PST From: "Dave Saunders" <daves@pdsassoc.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!216.170.153.135.MISMATCH!tdsnet-transit!newspeer.tds.net!out.nntp.be!propagator2-sterling!propagator-sterling!news-in-sterling.newsfeed.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: Heavy Text scripting Message-ID: <1de8b136.2@WebX.la2eafNXanI> Date: Fri, 11 Apr 2003 08:45:41 -0700 References: <1de8b136.-1@WebX.la2eafNXanI> Lines: 51 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit