您当前的位置: 首页 > 

插件开发

暂无认证

  • 2浏览

    0关注

    492博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

InDesign插件--常规功能开发--随机填充--js脚本开发--ID插件

插件开发 发布时间:2022-03-04 07:29:30 ,浏览量:2

  Adobe InDesign是Adobe公司的一个桌面出版 (DTP) 的应用程序,主要用于各种印刷品的排版编辑。InDesign可以将文档直接导出为Adobe的PDF格式,而且有多语言支持。采用脚本语言自动化编码,在学习中的一个重要功能是随机填充功能,以下源代码仅用于学习交流,请勿用于商业用途和其它非法用途。源代码如下所示:


//RandomFill.jsx
//An InDesign CS2 JavaScript
//
//This script fills the selected object or objects with random objects of your choosing.
//
//For more on InDesign scripting, go to http://www.adobe.com/products/indesign/scripting.html
//or visit the InDesign Scripting User to User forum at http://www.adobeforums.com
//
if (app.documents.length > 0) {
    if (app.selection.length > 0) {
        mySelectionSorter();
    } else {
        alert("Nothing is selected. Please select an object and try again.");
    }
} else {
    alert("No documents are open. Please open a document, select an object, and try again.");
}
function mySelectionSorter() {
    var myObjects = new Array;
    for (myCounter = 0; myCounter             
关注
打赏
1665481431
查看更多评论
0.0433s