如何从命令行执行InDesign扩展脚本? [英] How to execute an InDesign extendscript from command line?

查看:302
本文介绍了如何从命令行执行InDesign扩展脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从命令行(Windows)为InDesign执行.jsx脚本.

I need to execute a .jsx script for InDesign from command line (Windows).

对于Illustrator,它可以通过以下命令轻松使用:

For Illustrator, it works easily with the following command:

"C:\Program Files\Adobe\Adobe Illustrator CS6 (64 Bit)\Support Files\Contents\Windows\Illustrator.exe" "...\myscript.jsx"

两个应用程序Illustrator和ExtendScript Toolkit CS6都打开,然后脚本会自动启动.

Both applications Illustrator and ExtendScript Toolkit CS6 open then the script is automatically launched.

当我对InDesign尝试同样的操作时,它不起作用(InDesign说无法打开myscript.jsx ...").

When I try the same for InDesign, it doesn't work (InDesign says 'Unable to open myscript.jsx ...').

我还尝试通过以下命令行从命令行启动ExtendScript Toolkit:

I also tried to launch ExtendScript Toolkit from command line as below:

"C:\Program Files (x86)\Adobe\Adobe Utilities - CS6\ExtendScript Toolkit CS6\ExtendScript Toolkit.exe" "...\myscript.jsx"

结果是在加载了脚本的情况下打开了ExtendScript Toolkit应用程序,但未执行任何操作.

The result is ExtendScript Toolkit application is opened with the script loaded, but nothing is executed.

有人知道如何启动脚本吗?是否有要添加的-run-cmd自变量?

Does anyone know how to launch the script? Is there a -run or -cmd argument to add?

推荐答案

您的解决方案是从命令行调用VisualBasic脚本.然后,VB将基于引用了indesign应用程序本身来调用indesign jsx文件.有点棘手,但应该可以正常工作.

a solution of yours could be to call a visualbasic script from command line. That VB would then call the indesign jsx file based on having referenced teh indesign application itself. Kind of tricky but should definitively work.

这篇关于如何从命令行执行InDesign扩展脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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