Indesign 脚本 - 保存副本

发布于 2024-08-27 01:47:02 字数 213 浏览 12 评论 0原文

我正在使用 Objective-C 脚本桥与 InDesign CS3/CS4 进行通信。不幸的是,我被困在“保存”命令上,该命令似乎仅作为标准套件的一部分存在,并且未在 InDesign 中再次定义。因此,看起来我可以保存、另存为,但不能保存复制文档。有人知道如何继续吗?

只是简单地解释一下“保存”和“保存副本”之间的区别 - 使用“保存副本”不会更改当前文档,这与“保存”或“另存为”相反。

I'm using a Objective-C Scripting Bridge to communicate with InDesign CS3/CS4. Unfortunately I'm stuck on Save command which appears to be existing only as a part of the standard suite and not defined again in InDesign. Because of that it looks like I can Save, Save as but not Save Copy a document. Does anyone have any idea how to proceed?

Just to shortly explain the difference between Save and Save Copy - using Save Copy the current doc doesn't change which is opposite to Save or Save as.

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

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

发布评论

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

评论(4

天涯沦落人 2024-09-03 01:47:02

除了 philip-regan 建议之外的唯一替代方案。会使用 GUI 脚本,但我仍然不确定重点是什么。如果您想节省不关闭和重新打开的时间,您可以保存文档,通过查找器复制一份,然后在 indesgn 中继续前进,而不需要关闭和重新打开位

the only other alternative other than that which philip-regan suggests. Would be to use GUI scripting but I'm still not sure what the point would be. If you wanted to save time of not closing and reopening you could save the doc make a duplicate via the finder and continue onward in indesgn with out the close and re-open bit

熊抱啵儿 2024-09-03 01:47:02

我一直认为“另存为”和“保存副本”之间的区别比任何东西都更具语义性,因为该命令真正要做的就是执行“另存为”但在文件名后附加“copy”(例如,“MyLayout.indd”变为“MyLayout copy.indd”)。只需在保存文档时为文档指定一个备用名称,即可将Save 用作Save Copy 的替代方案。

根据OP的评论进行编辑:你是对的,字典中没有定义“保存副本”。我看到的解决此问题的唯一方法是通过使用新名称保存到位置、关闭当前尚未重命名的文档并重新打开原始文档来模仿命令的行为。我知道这并不理想,但我没有看到其他解决方法,除非在 Javascript API 中定义了“保存副本”,对此我表示怀疑。

I always thought the distinction between Save As and Save Copy as being more semantic than anything because all that command is really doing is performing a Save As but appending the file name with " copy" (e.g., "MyLayout.indd" becomes "MyLayout copy.indd"). Just use Save as a Save Copy alternative by giving an alternate name for the document when you save it.

Edit per OP's comments: You're right that Save Copy isn't defined in the dictionary. The only way I see around this is to mimic the command's behavior by saving to a location with a new name, closing the current-yet-renamed document, and reopening the original. Not ideal, I know, but I don't see another way around it, unless Save Copy is defined in the Javascript API, which I doubt.

稍尽春風 2024-09-03 01:47:02

出色地,
由于脚本字典中未定义“保存副本”,因此继续操作的唯一方法是保存当前文档并通过 Finder 创建副本。

Well,
since Save Copy is not defined in the scripting dictionary, the only way how to proceed is to save current document a create a copy via Finder.

天赋异禀 2024-09-03 01:47:02

如果您搜索 InDesign 的头文件,则会弹出以下方法:

- (InDesignDocument *) saveTo:(id)to stationery:(BOOL)stationery versionComments:(NSString *)versionComments forceSave:(BOOL)forceSave;  // Save the document

- (void) saveACopyTo:(id)to stationery:(BOOL)stationery;  // Saves a copy of the document.

If you search the header file for InDesign, these are the methods that pop up:

- (InDesignDocument *) saveTo:(id)to stationery:(BOOL)stationery versionComments:(NSString *)versionComments forceSave:(BOOL)forceSave;  // Save the document

- (void) saveACopyTo:(id)to stationery:(BOOL)stationery;  // Saves a copy of the document.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文