Article View: adobe.scripting.indesign
Article #15126Re: Getting Info Out of the JS Debugger
From: Dave_Saunders
Date: Wed, 31 Dec 2003 13:02
Date: Wed, 31 Dec 2003 13:02
20 lines
2363 bytes
2363 bytes
I can think of various strategies. One that I've played with but not fully implemented is: a. hide palettes b. create a new document and set its bounds so that it appears where the palettes were (this cannot be discovered by the script, so you need to know in advance where to put the document). c. Put a text frame into the document and populate it with your status report. d. Each time you change the report, ask for the baseline of the last line of the text frame -- this will force the composer to reflow that frame and it should update. Another approach, which I did implement in a job where my script has to walk through a very long story populating certain paragaphs with sequential numbers, was this: a. Every 100th number, save the document (otherwise the performance will drop through the floor because of the undos) b. Add an extra paragraph at the beginning of the story and each time just before I save the document, put the current value of the counter into that paragraph. c. At the end, delete the paragraph. This works because the save causes a reflow, although it obviously is not something you can do if your script cares about which page stuff is on because that extra paragraph moves everything. I suppose the paragraph could have been in a temporary frame. I have another script I'm writing where I need to update the contents of a particular text frame on each page. With close to 2000 pages to be done, this could take a while. I'm thinking I can use something akin to my fist idea, except that every 20th page, I can select the frame I'm working on and then ask for the baseline of its last line. This should cause the display to update. Dave
Technical Details
Message-ID:
<2ccf226c.2@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!xmission!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!webxReferences:
<2ccf226c.-1@webx.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,fe4467249b60f26b X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-12-31 05:07:33 PST From: Dave_Saunders@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!xmission!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: Re: Getting Info Out of the JS Debugger Message-ID: <2ccf226c.2@webx.la2eafNXanI> Date: Wed, 31 Dec 2003 05:02:56 -0800 References: <2ccf226c.-1@webx.la2eafNXanI> Lines: 38 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit