illustrator插件-拼版功能开发-印前角线-js脚本开发-ai插件( 二 )

< textFonts.length;i += 1) {if (textFonts[i].family == fnValue.text && textFonts[i].style == "Regular" || textFonts[i].style == "常规体" || textFonts[i].style == "L" || textFonts[i].style == "R") {Textfontname = textFonts[i];}}textfontsize = fsValue.text * v;regWin.close();function6 ();};cancleBt.onClick = function() {regWin.close();};yuzhi.onClick = function() {function4 ();regWin2.center();regWin2.show();};baocunshezhi.onClick = function() {function5 ();regWin3.center();regWin3.show();};regWin.center();regWin.show();}function function4 () {regWin2 = new Window("dialog", "预置", [0, 0, 380, 180], {resizeable: true,resizeable: false});group111 = regWin2.add("panel", [8, 8, 313, 171], "设置");fontname = group111.add("statictext", [10, 21, 80, 41], "字体:", {multiline: true});fnValue = group111.add("edittext", [50, 18, 140, 38], AutoMarkXml.fnValue, {readonly: 0,noecho: 0,borderless: 0,multiline: 0,enterKeySignalsOnChange: 0});fontsize = group111.add("statictext", [160, 21, 230, 41], "大小:", {multiline: true});fsValue = group111.add("edittext", [200, 18, 290, 38], AutoMarkXml.fsValue, {readonly: 0,noecho: 0,borderless: 0,multiline: 0,enterKeySignalsOnChange: 0});colorWide = group111.add("statictext", [10, 56, 80, 76], "色标长度:", {multiline: true});cwValue = group111.add("edittext", [70, 53, 140, 73], AutoMarkXml.cwValue, {readonly: 0,noecho: 0,borderless: 0,multiline: 0,enterKeySignalsOnChange: 0});colorHigh = group111.add("statictext", [10, 90, 80, 110], "色标高度:", {multiline: true});chValue = group111.add("edittext", [70, 88, 140, 108], AutoMarkXml.cwValue, {readonly: 0,noecho: 0,borderless: 0,multiline: 0,enterKeySignalsOnChange: 0});colorSpace = group111.add("statictext", [159, 56, 229, 76], "色标间距:", {multiline: true});csValue = group111.add("edittext", [220, 53, 290, 73], AutoMarkXml.csValue, {readonly: 0,noecho: 0,borderless: 0,multiline: 0,enterKeySignalsOnChange: 0});roundD = group111.add("statictext", [159, 90, 233, 110], "圆形直径:", {multiline: true});rdValue = group111.add("edittext", [220, 88, 290, 108], AutoMarkXml.rdValue, {readonly: 0,noecho: 0,borderless: 0,multiline: 0,enterKeySignalsOnChange: 0});colorlevel = group111.add("statictext", [10, 125, 84, 145], "色条层阶:", {multiline: true});clValue = group111.add("edittext", [70, 123, 290, 143], AutoMarkXml.clValue, {readonly: 0,noecho: 0,borderless: 0,multiline: 0,enterKeySignalsOnChange: 0});yuzhiOK = regWin2.add("button", [320, 18, 370, 38], "确定");yuzhiquziao = regWin2.add("button", [320, 56, 370, 76], "取消");yuzhiSave = regWin2.add("button", [320, 138, 370, 158], "保存");yuzhiOK.onClick = function() {function7 ();regWin2.close();};yuzhiquziao.onClick = function() {regWin2.close();};yuzhiSave.onClick = function() {function7 ();};}function function5 () {regWin3 = new Window("dialog", "保存设置", [0, 0, 370, 135], {resizeable: true,resizeable: false});yushe2 = regWin3.add("panel", [8, 8, 298, 123], "预设");yusheweizhi = yushe2.add("statictext", [9, 21, 79, 41], "位置:", {multiline: true});weizhi1 = yushe2.add("radiobutton", [55, 17, 145, 37], "1");weizhi1.value = 1;weizhi2 = yushe2.add("radiobutton", [95, 17, 185, 37], "2");weizhi2.value = 0;weizhi3 = yushe2.add("radiobutton", [135, 17, 225, 37], "3");weizhi3.value = 0;weizhi4 = yushe2.add("radiobutton", [172, 17, 262, 37], "4");weizhi4.value = 0;weizhi5 = yushe2.add("radiobutton", [210, 17, 300, 37], "5");weizhi5.value = 0;weizhi6 = yushe2.add("radiobutton", [250, 17, 340, 37], "6");weizhi6.value = 0;weizhi7 = yushe2.add("radiobutton", [55, 47, 145, 67], "7");weizhi7.value = 0;weizhi8 = yushe2.add("radiobutton", [95, 47, 185, 67], "8");weizhi8.value = 0;weizhi9 = yushe2.add("radiobutton", [135, 47, 225, 67], "9");weizhi9.value = 0;weizhi10 = yushe2.add("radiobutton", [172, 47, 262, 67], "10");weizhi10.value = 0;weizhi11 = yushe2.add("radiobutton", [210, 47, 300, 67], "11");weizhi11.value = 0;weizhi12 = yushe2.add("radiobutton", [250, 47, 340, 67], "12");weizhi12.value = 0;mingcheng2 = yushe2.add("statictext", [9, 79, 79, 99], "名称:", {multiline: true});mingcheng2kuang = yushe2.add("edittext", [55, 75, 205, 95], "预设一", {readonly: 0,noecho: 0,borderless: 0,multiline: 0,enterKeySignalsOnChange: 0});yusheOK2 = regWin3.add("button", [302, 21, 362, 41], "确定");yushequxiao2 = regWin3.add("button", [302, 58, 362, 78], "取消");yusheOK2.onClick = function() {regWin3.close();};yushequxiao2.onClick = function() {regWin3.close();};}function function6 () {doc = activeDocument;cutlayer = doc.layers.add();cutlayer.name = "角线图层";g = cutlayer.groupItems.add();for (vari = 0;i < doc.spots.length;i += 1) {if (doc.spots[i].typename == "Spot" && doc.spots[i].colorType == ColorModel.REGISTRATION) {regColor = new SpotColor();regColor.spot = doc.spots[i];break;}}theSelect = doc.selection;if (theSelect.length == 0) {doc.selectObjectsOnActiveArtboard();theSelect = doc.selection;}lmin = theSelect[0].geometricBounds[0];tmax = theSelect[0].geometricBounds[1];lmax = theSelect[0].geometricBounds[2];tmin = theSelect[0].geometricBounds[3];if (bleeded2 == true) {w1 = theSelect[0].width - (outspace * 2);h1 = theSelect[0].height - (outspace * 2);} else {w1 = theSelect[0].width;h1 = theSelect[0].height;}for (vari = 1;i


推荐阅读