1.算法程序illustrator是矢量编辑软件,在印刷方面的一个重要功能就是拼版,开发一个印前角线功能,源代码如下所示:
【illustrator插件-拼版功能开发-印前角线-js脚本开发-ai插件】Ver = "v7.3";var platFormType = Folder.fs;if (platFormType == "windows") {gArgG = decodeURI(new File($.fileName).path) + "/AutoMark_" + Ver + ".xml";} else {gArgG = Folder.myDocuments + "/AutoMark_" + Ver + ".xml";}function function1 () {NewFileVal = new File(gArgG);if (NewFileVal.exists == false) {function2 ();}AutoMarkinfo = function3 ("read", gArgG);AutoMarkXml = new XML(AutoMarkinfo);regWin = new Window("dialog", "角线X " + Ver + " tiandiyiqi 89766284", [0, 0, 475, 385], {resizeable: true,resizeable: false});caiqiezu = regWin.add("group", [0, 0, 390, 122], "undefined");caiqiexian = caiqiezu.add("panel", [12, 8, 387, 116], "裁切线");lineLengh = caiqiezu.add("statictext", [24, 37, 94, 57], "长度:");linewide = caiqiezu.add("statictext", [24, 64, 94, 84], "宽度:");outSpace = caiqiezu.add("statictext", [155, 34, 225, 54], "出血:");lineSpace = caiqiezu.add("statictext", [155, 61, 225, 81], "偏移:");lLValue = https://www.isolves.com/it/rj/yy/2022-03-17/caiqiezu.add("edittext", [58, 34, 138, 54], AutoMarkXml.lLValue);lwValue = caiqiezu.add("edittext", [58, 60, 138, 80], AutoMarkXml.lwValue);lSValue = caiqiezu.add("edittext", [186, 60, 266, 80], AutoMarkXml.lSValue);oSValue = caiqiezu.add("edittext", [186, 34, 266, 54], AutoMarkXml.oSValue);doubleLine = caiqiezu.add("checkbox", [312, 33, 382, 53], "双角线");doubleLine.value = AutoMarkXml.doubleLine - 0;JPLine = caiqiezu.add("checkbox", [312, 61, 382, 81], "日式角线");JPLine.value = AutoMarkXml.JPLine - 0;havebleed = caiqiezu.add("statictext", [25, 93, 95, 113], "模式:");buhanchuxue = caiqiezu.add("radiobutton", [74, 90, 164, 110], "不含出血");buhanchuxue.value = AutoMarkXml.buhanchuxue - 0;quanbuchuxue = caiqiezu.add("radiobutton", [195, 90, 285, 110], "全部出血");quanbuchuxue.value = AutoMarkXml.quanbuchuxue - 0;dabanchuxue = caiqiezu.add("radiobutton", [312, 90, 402, 110], "大版出血");dabanchuxue.value = AutoMarkXml.dabanchuxue - 0;yansezu = regWin.add("group", [0, 120, 230, 215], "undefined");yansexian = yansezu.add("panel", [12, 0, 225, 92], "颜色");CMYK = yansexian.add("radiobutton", [12, 11, 102, 31], "英文");CMYK.value = AutoMarkXml.CMYK - 0;mingcheng = yansexian.add("radiobutton", [58, 11, 156, 31], "中英文");mingcheng.value = AutoMarkXml.mingcheng - 0;wu = yansexian.add("radiobutton", [118, 11, 205, 31], "无");wu.value = AutoMarkXml.wu - 0;boolCx = yansexian.add("checkbox", [13, 33, 83, 53], "C");boolCx.value = AutoMarkXml.boolCx - 0;boolMx = yansexian.add("checkbox", [65, 33, 137, 53], "M");boolMx.value = AutoMarkXml.boolMx - 0;boolYx = yansexian.add("checkbox", [115, 33, 185, 53], "Y");boolYx.value = AutoMarkXml.boolYx - 0;boolKx = yansexian.add("checkbox", [159, 33, 229, 53], "K");boolKx.value = AutoMarkXml.boolKx - 0;colorLable = yansexian.add("checkbox", [159, 10, 229, 30], "色条");colorLable.value = AutoMarkXml.colorLable - 0;ptReplace = yansexian.add("statictext", [10, 59, 110, 79], "Pantone代替:", {multiline: true});prValue = yansexian.add("edittext", [95, 57, 198, 73], AutoMarkXml.prValue, {readonly: 0,noecho: 0,borderless: 0,multiline: 0,enterKeySignalsOnChange: 0});CMYK.onClick = mingcheng.onClick = function() {if (CMYK.value == true || mingcheng.value == true) {boolCx.value = true;boolMx.value = true;boolYx.value = true;boolKx.value = true;}};wu.onClick = function() {if (wu.value == true) {CMYK.value = false;mingcheng.value = false;boolCx.value = false;boolMx.value = false;boolYx.value = false;boolKx.value = false;colorLable.value = false;}};boolCx.onClick = boolMx.onClick = boolYx.onClick = boolKx.onClick = function() {if (boolCx.value == false && boolMx.value == false && boolYx.value == false && boolKx.value == false) {wu.value = true;}if (boolCx.value == true && boolMx.value == true && boolYx.value == true && boolKx.value == true) {CMYK.value = true;}};xinxizu = regWin.add("group", [230, 120, 390, 258], "undefined");xinxixian = xinxizu.add("panel", [0, 0, 157, 123], "信息");haveFN = xinxizu.add("checkbox", [11, 18, 81, 38], "文件名");haveFN.value = AutoMarkXml.haveFN - 0;haveTM = xinxizu.add("checkbox", [11, 43, 81, 63], "日期");haveTM.value = AutoMarkXml.haveTM - 0;havePT = xinxizu.add("checkbox", [11, 68, 81, 88], "路径");havePT.value = AutoMarkXml.havePT - 0;bite = xinxizu.add("checkbox", [11, 92, 81, 112], "咬口");bite.value = AutoMarkXml.bite - 0;littleSize = xinxizu.add("checkbox", [83, 18, 153, 38], "单模尺寸");littleSize.value = AutoMarkXml.littleSize - 0;bigSize = xinxizu.add("checkbox", [83, 43, 153, 63], "拼版尺寸");bigSize.value = AutoMarkXml.bigSize - 0;paperSize = xinxizu.add("checkbox", [83, 69, 153, 89], "角线尺寸");paperSize.value = AutoMarkXml.paperSize - 0;paperSize1 = xinxizu.add("checkbox", [83, 92, 153, 112], "纸张尺寸");paperSize1.value = AutoMarkXml.paperSize1 - 0;beizhuzu = regWin.add("group", [0, 214, 230, 241], "undefined");otherInfo = beizhuzu.add("statictext", [21, 7, 91, 27], "备注:", {multiline: true});oiValue = beizhuzu.add("edittext", [60, 3, 225, 23], AutoMarkXml.oiValue, {readonly: 0,noecho: 0,borderless: 0,multiline: 0,enterKeySignalsOnChange: 0});CTPzu = regWin.add("group", [0, 239, 390, 387], "undefined");CTPxian = CTPzu.add("panel", [12, 5, 387, 135], "CTP");paperInfo = CTPzu.add("statictext", [23, 29, 93, 49], "纸张:", {multiline: true});paperW = CTPzu.add("edittext", [60, 25, 110, 45], AutoMarkXml.paperW, {readonly: 0,noecho: 0,borderless: 0,multiline: 0,enterKeySignalsOnChange: 0});X1 = CTPzu.add("statictext", [115, 29, 185, 49], "X", {multiline: true});paperH = CTPzu.add("edittext", [130, 25, 180, 45], AutoMarkXml.paperH, {readonly: 0,noecho: 0,borderless: 0,multiline: 0,enterKeySignalsOnChange: 0});paper3 = regWin.add("statictext", [195, 267, 238, 287], "咬口:");paperB = CTPzu.add("edittext", [238, 25, 275, 45], AutoMarkXml.paperB, {readonly: 0,noecho: 0,borderless: 0,multiline: 0,enterKeySignalsOnChange: 0});platoInfo = CTPzu.add("statictext", [22, 54, 92, 74], "版材:", {multiline: true});platoW = CTPzu.add("edittext", [60, 50, 110, 70], AutoMarkXml.platoW, {readonly: 0,noecho: 0,borderless: 0,multiline: 0,enterKeySignalsOnChange: 0});X2 = CTPzu.add("statictext", [115, 55, 185, 75], "X", {multiline: true});platoH = CTPzu.add("edittext", [130, 50, 180, 70], AutoMarkXml.platoH, {readonly: 0,noecho: 0,borderless: 0,multiline: 0,enterKeySignalsOnChange: 0});plate3 = CTPzu.add("statictext", [195, 53, 238, 73], "咬口:");platoB = CTPzu.add("edittext", [238, 50, 275, 70], AutoMarkXml.platoB, {readonly: 0,noecho: 0,borderless: 0,multiline: 0,enterKeySignalsOnChange: 0});cxdb = CTPzu.add("statictext", [283, 53, 353, 73], "去 边:", {multiline: true});cxdbkuang = CTPzu.add("edittext", [336, 50, 376, 70], AutoMarkXml.cxdbkuang, {readonly: 0,noecho: 0,borderless: 0,multiline: 0,enterKeySignalsOnChange: 0});autopage = regWin.add("checkbox", [27, 320, 97, 340], "自动页面");autopage.value = AutoMarkXml.autopage - 0;ABtrans = regWin.add("checkbox", [130, 320, 200, 340], "版纸设定");ABtrans.value = AutoMarkXml.ABtrans - 0;gird = regWin.add("checkbox", [230, 320, 300, 340], "辅助线");gird.value = AutoMarkXml.gird - 0;onlyCTP = regWin.add("checkbox", [318, 320, 388, 340], "仅 CTP");onlyCTP.value = AutoMarkXml.onlyCTP - 0;autopage.onClick = function() {if (autopage.value == true) {ABtrans.value = false;gird.value = false;onlyCTP.value = false;}};ABtrans.onClick = gird.onClick = onlyCTP.onClick = function() {if (ABtrans.value == true || gird.value == true || onlyCTP.value == true) {autopage.value = false;}};selectFile = regWin.add("button", [27, 345, 77, 365], "链 接:");sfValue = regWin.add("edittext", [85, 345, 230, 365], AutoMarkXml.sfValue, {readonly: 0,noecho: 0,borderless: 0,multiline: 0,enterKeySignalsOnChange: 0});selectFile.onClick = function() {var?= File.openDialog("选择脚本", "PDF:*.pdf,EPS:*.eps,AI:*.ai", false);if (?!= null) {sfValue.text = ?fsName}};linkMove = regWin.add("statictext", [239, 350, 309, 367], "位 移:", {multiline: true});lmValue = regWin.add("edittext", [280, 345, 316, 365], AutoMarkXml.lmValue, {readonly: 0,noecho: 0,borderless: 0,multiline: 0,enterKeySignalsOnChange: 0});embed = regWin.add("checkbox", [330, 345, 400, 368], "嵌入");embed.value = AutoMarkXml.embed - 0;zelanzu = regWin.add("group", [390, 0, 475, 385], "undefined");okBt = zelanzu.add("button", [3, 16, 76, 36], "确定");cancleBt = zelanzu.add("button", [3, 46, 76, 66], "取消");yuzhi = zelanzu.add("button", [3, 75, 76, 95], "预置");yushe1 = zelanzu.add("button", [3, 125, 76, 145], "预设一");yushe2 = zelanzu.add("button", [3, 153, 76, 173], "预设二");yushe3 = zelanzu.add("button", [3, 181, 36, 201], "三");yushe4 = zelanzu.add("button", [43, 181, 76, 201], "四");yushe5 = zelanzu.add("button", [3, 210, 36, 230], "五");yushe6 = zelanzu.add("button", [43, 210, 76, 230], "六");yushe7 = zelanzu.add("button", [3, 240, 36, 260], "七");yushe8 = zelanzu.add("button", [43, 240, 76, 260], "八");yushe9 = zelanzu.add("button", [3, 270, 36, 290], "九");yushe10 = zelanzu.add("button", [43, 270, 76, 290], "十");yushe11 = zelanzu.add("button", [3, 300, 36, 320], "11");yushe12 = zelanzu.add("button", [43, 300, 76, 320], "12");baocunshezhi = zelanzu.add("button", [3, 330, 76, 370], "保存设置");okBt.onClick = function() {function4 ();regWin2.close();function7 ();v = 2.83464566929134;linelength = lLValue.text * v;lw = lwValue.text * v;linespace = lSValue.text * v;outspace = oSValue.text * v;qubian = cxdbkuang.text * v;if (boolCx.value == true) {boolC = true;} else {boolC = false;}if (boolMx.value == true) {boolM = true;} else {boolM = false;}if (boolYx.value == true) {boolY = true;} else {boolY = false;}if (boolKx.value == true) {boolK = true;} else {boolK = false;}cspace = csValue.text * v;ptRe = prValue.text;od = rdValue.text * v;cw = cwValue.text * v;ch = chValue.text * v;level = clValue.text;Plate_width = platoW.text * v;Plate_heigth = platoH.text * v;Plate_bite = platoB.text * v;Paper_width = paperW.text * v;Paper_heigth = paperH.text * v;Paper_bite = paperB.text * v;if (CMYK.value == true) {colormodul = 0;}if (mingcheng.value == true) {colormodul = 1;}if (wu.value == true) {colormodul = 2;}if (buhanchuxue.value == true) {bleeded = false;bleeded2 = false;}if (quanbuchuxue.value == true) {bleeded = true;bleeded2 = true;}if (dabanchuxue.value == true) {bleeded = true;bleeded2 = false;}if (doubleLine.value == true) {shuangjiaoxian = true;} else {shuangjiaoxian = false;}if (JPLine.value == true) {rishicaiqie = true;} else {rishicaiqie = false;}for (vari = 0;i
推荐阅读
- 人工智能文档编写器:使用AI生成Javadocs等文档的插件扩展
- 2022必须拥有Chrome扩展程序 - 浏览器插件,让你上网效率翻倍
- 特别好用的office插件,你值得拥有
- Visual Studio插件CodeRush v21.2.7全新发布
- IDEA 安装和使用Kafka 可视化管理插件Kafkalytic
- 七个好用的Edge浏览器插件分享,满满的干货
- 2021又一款Ps智能Ai修饰插件Retouch Pro来了!小白也变修图大神
- 最近160 万个 WordPress 网站被黑客攻击,黑客仅通过4个不同插件
- Chrome的年度最佳浏览器插件
- 专门针对chrome谷歌浏览器而开发的一款访问插件