tailieunhanh - Scripting InDesign CS34 with JavaScript
InDesign provides a powerful setof tools for producing beautifuldocuments. While you can certainlydo all your work by hand throughInDesign's graphical interface, thereare many times when it's much easier towrite a script. Once you've automateda task, you can run it over the wholedocument, ensuring consistency, orjust when you need it, simplifying andspeeding your layout process. All ittakes is a bit of JavaScript knowledgeand a willingness to explore InDesign'sprogramming features. | O REILLY Short Cuts Scripting InDesign CS3 4 with JavaScript By Peter Kahrel Copyright 2009 O Reilly Media Inc. ISBN 978-0-596-80252-3 InDesign provides a powerful set of tools for producing beautiful documents. While you can certainly do all your work by hand through InDesign s graphical interface there are many times when it s much easier to write a script. Once you ve automated a task you can run it over the whole document ensuring consistency or just when you need it simplifying and speeding your layout process. All it takes is a bit of JavaScript knowledge and a willingness to explore InDesign s programming features. Contents Hello World .3 The ExtendScript Toolkit ESTK .5 InDesign s Object The Object Model Catching Running Working with Working with Find and Text O REILLY Short Cuts Find more at Introduction Two things stand between the would-be scripter and an InDesign Javascript InDesign s object model and JavaScript. Though both are complex once a few hurdles are overcome anyone can start writing scripts fairly quickly. This PDF hopes to show that numerous tedious tasks in InDesign can be automated with very simple scripts of sometimes just one or two lines. These simple scripts can pave the way to more complicated scripts. What you need most of all is determination. To give just one short example imagine this task you have a document with dozens of pages and each page contains one or more text frames and one or more graphics. All these page items are on the same layer and you decide that the document would be much easier to handle if the graphics were on a separate layer. The task then consists of two steps create a new layer and move all graphics to this layer. Can you imagine doing this manually Well the following two-line script does it for you in a couple of seconds myLayer .
đang nạp các trang xem trước