如何将InDesign / InCopy脚本编写为“签入”和“结账” textFrames? [英] How to script InDesign/InCopy to "Check In" and "Check Out" textFrames?

查看:103
本文介绍了如何将InDesign / InCopy脚本编写为“签入”和“结账” textFrames?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对InCopy不太熟悉。我一直看到它是一个单独的应用程序,但我这里只有InDesign CS6,没有InCopy CS6。然而,我可以在InDesign中访问InCopy功能,例如签出/签出各种textFrames进行编辑,然后在链接面板中刷新它们,以便更新文档中其他页面上的其他textFrame。

I am not very familiar with InCopy. I keep seeing that it's a separate application, but I only have InDesign CS6 here, no InCopy CS6. Yet I am able to access InCopy functions within InDesign, such as "checking out/in" various textFrames for editing, then refreshing them in the Links panel so they update other textFrames on other pages in the document.

我的问题是这个—如何使用ExtendScript自动执行此过程?:

My question is this—How can I use ExtendScript to automate this process?:


  1. InCopy>签出特定的textFrame。

  2. 更改其中的文字或其属性等。

  3. InCopy>签入该textFrame。

  4. 刷新链接,以便使用新信息更新文档中的其他InCopy textFrame。

  1. InCopy > Check Out a specific textFrame.
  2. Alter the text within it, or its properties, etc.
  3. InCopy > Check In that textFrame.
  4. Refresh the links so that the other InCopy textFrames in the document are updated with the new info.

任何想法,拜托?

推荐答案

你有到目前为止尝试过的代码吗?

Do you have any code that you've tried so far?

我在黑暗中捅了一下,但我可能会从这样的事情开始:

I'm taking a stab in the dark here, but I might start off with something like this:

var story = textFrame.parentStory;
story.checkOut();
story.contents += " This is added to the end.";
story.checkIn();
story.recompose();
var linksArr = document.links.everyItem().getElements();
for (var i = 0; i < linksArr.length; i++) {
    linksArr[i].update();
}

这篇关于如何将InDesign / InCopy脚本编写为“签入”和“结账” textFrames?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆