Rapidly learn InDesign scripting?

删除回忆录丶 提交于 2019-12-06 16:10:45

问题


In the middle of a large publishing project, and the sheer scale is weighing me down. Many deadlines coming down the pipe, and most of my trouble is tedium and repetitive tasks. I need to pick up the basics of InDesign scripting pronto, and I'm looking for resources or books which will get me up to speed.

I get Java, XML and some web techs... I am not a programming professional, however, and JavaScript is new to me. Mac/Linux, if it matters.

Advice? Thanks in advance.


回答1:




@niteshade --

     Old thread here, but check out http://codingbat.com/ if you are not so busy now. This is an excellent site for practicing basic programming logic. The languages on this site are Java and Python, but the logic applies to other languages as well, such as Javascript and PHP.

     It's actually a very challenging site, And there are a lot of problems on it, so you would probably gain a lot of insight before solving even half of them. Some of these took me a week or so to figure out, such as these notorious ones: makeBricks, and xyzMiddle.


     Also, for good InDesign books definitely get InDesign CS5 Automation Using XML & JavaScript. As the title suggests, it deals in detail with XML, but it also includes the entirety of the smaller version "InDesign CS5 JavaScript" (both books by Grant Gamble).

     The best tutorial that Adobe itself has put out (that I am aware of anyway) is the Javascript Tools Guide CS5. This is a pretty good reference for obscure functions, and has good examples of how to use most of these.

     Also, at times you may need to communicate with other programs in Adobe's Creative Suite (like InDesign sending images to Photoshop, for example). To do this, you need to make use of the  BridgeTalk  object (not to be confused with Adobe's "Bridge", though it is part of this program). Here is the best reference I have found on the  BridgeTalk  object -- The Adobe Bridge SDK. And you should also study this script by Kasyan Servetsky -- http://kasyan.ho.com.ua/convert_cmyk-rgb_images_to_grayscale.html.

     Adobe itself has scattered and poor documentation (in my opinion anyway), but an outside source has made an excellent reference for InDesign's Object Model -- http://jongware.mit.edu/idcs5js/index.html. Similarly, there is another great outside resource for Photoshop's Object Model -- http://objjob.phrogz.net/pshop/hierarchy. These are both difficult to look at at first, but for starters look at these two functions --  app.documents.add() , and  app.activeDocument.close() . Now find "Application" in the index of the Object Model reference to see these properties and methods.


     The "object model" of InDesign differs from that of Photoshop in many ways. This means that there are different methods and properties that the script can access in each program. And though scripting in both InDesign and Photoshop have different DOM's, they share the same basis in Javascript functionality and syntax.

     And again -- Adobe's scripting in general does not share the DOM methods and properties of that of Javascript itself, because Javascript's DOM is meant to access a web browser's document-tree. This is what defines Adobe scripting as  Extendscript  as opposed to Javascript.

Also noteworthy is that Extendscript can access the file-system of the OS, whereas Javascript can not (consider  myFolder.execute() ).


Anyway, as the title suggests, this is how I myself have rapidly learned InDesign scripting, in just the past few months really.




回答2:


Take a look at this thread: It has a bunch of books on programming. Both language-agnostic and for various languages. All of them are supposed to be free, too.

A quick browse through the titles seemed to show "How to Design Programs", "Essential JavaScript And jQuery Design Patterns" and, "OO Design". All might be helpful to you.

I'd also really suggest the O'Reilly book on InDesign. I haven't read it, and according to the e-shop, it was published in 2006, but from my experience, O'Reilly is a great source.

Also, Adobe's page on this.

Good luck,




回答3:


Well if it is any help since you are on Mac I'd suggest Applescript. It can be a bit easier to use than Javascript. JS can be used on a PC though so it has it's advantages as well. Applescript is somewhat more of a natural language. Might be easier to pick up.

Applescript has a library you can access that helps me considerably. The Guide and Reference are also helpful to have. Lastly the Adobe Forums are usually fairly helpful. forums.adobe.com/community/indesign/indesign_scripting




回答4:


Try these macgrunt applescript tuts.

I learnt most my stuff from him

http://macgrunt.com/category/indesign/scripting-lesson/



来源:https://stackoverflow.com/questions/9222442/rapidly-learn-indesign-scripting

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!