快速学习 InDesign 脚本编写?

发布于 2025-01-04 01:11:12 字数 213 浏览 1 评论 0原文

在一个大型出版项目中,庞大的规模让我感到沉重。许多最后期限即将到来,我的大部分麻烦都是单调乏味和重复性的任务。我需要立即学习 InDesign 脚本编写的基础知识,并且我正在寻找能够帮助我快速入门的资源或书籍。

我了解 Java、XML 和一些 Web 技术...但是,我不是编程专业人士,JavaScript 对我来说是新的。 Mac/Linux,如果有的话。

建议?提前致谢。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

只是偏爱你 2025-01-11 01:11:13

好吧,如果它对您有帮助,因为您使用的是 Mac,我建议您使用 Applescript。它比 JavaScript 更容易使用。 JS可以在PC上使用,所以它也有它的优点。 Applescript 更像是一种自然语言。可能更容易捡起来。

Applescript 有一个可以访问的库,它对我帮助很大。 指南参考也是有帮助。最后,Adobe 论坛通常非常有帮助。
forums.adobe.com/community/indesign/indesign_scripting

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

凑诗 2025-01-11 01:11:13

试试这些 macgrunt applescript 吧。

我从他那里学到了大部分东西

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

Try these macgrunt applescript tuts.

I learnt most my stuff from him

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

漫雪独思 2025-01-11 01:11:12

@nitshade——

     这里是旧线程,但请查看 http://codingbat.com/如果你现在没那么忙的话。这是练习基本编程逻辑的绝佳网站。该网站上的语言是 Java 和 Python,但逻辑也适用于其他语言,例如 Javascript 和 PHP。

     这实际上是一个非常具有挑战性的网站,而且上面有很多问题,所以在解决一半问题之前你可能会获得很多见解。其中一些花了我一周左右的时间才弄清楚,例如这些臭名昭著的:makeBricks,以及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.

@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.

∞觅青森が 2025-01-11 01:11:12

看看这个线程:它有很多关于编程的书籍。既与语言无关又适用于多种语言。所有这些都应该是免费的。

快速浏览标题似乎显示“如何设计程序”、“基本 JavaScript 和 jQuery 设计模式”和“OO 设计”。一切可能对你有帮助。

我还强烈建议您阅读O'Reilly 的 InDesign 书籍。我还没有读过它,根据电子商店的说法,它是 2006 年出版的,但根据我的经验,O'Reilly 是一个很好的来源。

另外,Adobe 的页面。

很好运气,

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,

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文