首页 > 技术 > AI/人工智能

怎么制作ai插件丨ai标签形状插件

人阅读 2023-05-28 15:20:00

【怎么制作ai插件丨ai标签形状插件】lot物联网小编为你整理了的相关内容,希望能为你解答。

1 方法原理

illustrator是矢量编辑软件,画板是绘制处理的重要容器,在印刷方面的一个重要功能就是查找白色叠印,开发一个查找白色叠印功能,以下功能仅用于学习交流,请勿用于非法用途和商业用途,源代码如下所示:

checkwhiteoverprint();function whiteoverprint() { for (var k = app.activeDocument.pathItems.length - 1; k > -1; k--) { if (app.activeDocument.pathItems[k].fillColor != "[SpotColor]") { if (app.activeDocument.pathItems[k].fillColor == "[CMYKColor]") { if (app.activeDocument.pathItems[k].fillColor.cyan == 0 && app.activeDocument.pathItems[k].fillColor.magenta == 0 && app.activeDocument.pathItems[k].fillColor.yellow == 0 && app.activeDocument.pathItems[k].fillColor.black == 0 && app.activeDocument.pathItems[k].fillOverprint == true && app.activeDocument.pathItems[k].fillColor != "[None]") { app.activeDocument.pathItems[k].selected = true; app.activeDocument.pathItems[k].fillOverprint = false; } } if (app.activeDocument.pathItems[k].strokeColor == "[CMYKColor]") { if (app.activeDocument.pathItems[k].strokeColor.cyan == 0 && app.activeDocument.pathItems[k].strokeColor.magenta == 0 && app.activeDocument.pathItems[k].strokeColor.yellow == 0 && app.activeDocument.pathItems[k].strokeColor.black == 0 && app.activeDocument.pathItems[k].strokeOverprint == true && app.activeDocument.pathItems[k].strokeColor != "[None]") { app.activeDocument.pathItems[k].selected = true; app.activeDocument.pathItems[k].strokeOverprint = false; } } if (app.activeDocument.pathItems[k].fillColor == "[RGBColor]") { if (app.activeDocument.pathItems[k].fillColor.red == 255 && app.activeDocument.pathItems[k].fillColor.green == 255 && app.activeDocument.pathItems[k].fillColor.blue == 255 && app.activeDocument.pathItems[k].fillOverprint == true && app.activeDocument.pathItems[k].fillColor != "[None]") { app.activeDocument.pathItems[k].selected = true; app.activeDocument.pathItems[k].fillOverprint = false; } } if (app.activeDocument.pathItems[k].strokeColor == "[RGBColor]") { if (app.activeDocument.pathItems[k].strokeColor.red == 255 && app.activeDocument.pathItems[k].strokeColor.green == 255 && app.activeDocument.pathItems[k].strokeColor.blue == 255 && app.activeDocument.pathItems[k].strokeOverprint == true && app.activeDocument.pathItems[k].strokeColor != "[None]") { app.activeDocument.pathItems[k].selected = true; app.activeDocument.pathItems[k].strokeOverprint = false; } } if (app.activeDocument.pathItems[k].fillColor == "[GrayColor]") { if (app.activeDocument.pathItems[k].fillColor.gray == 0 && app.activeDocument.pathItems[k].fillOverprint == true && app.activeDocument.pathItems[k].fillColor != "[None]") { app.activeDocument.pathItems[k].selected = true; app.activeDocument.pathItems[k].fillOverprint = false; } } if (app.activeDocument.pathItems[k].strokeColor == "[GrayColor]") { if (app.activeDocument.pathItems[k].strokeColor.gray == 0 && app.activeDocument.pathItems[k].strokeOverprint == true && app.activeDocument.pathItems[k].strokeColor != "[None]") { app.activeDocument.pathItems[k].selected = true; app.activeDocument.pathItems[k].strokeOverprint = false; } } } } for (var k = app.activeDocument.compoundPathItems.length - 1; k > -1; k--) { if (app.activeDocument.compoundPathItems[k].fillColor != "[SpotColor]") { if (app.activeDocument.compoundPathItems[k].fillColor == "[CMYKColor]") { if (app.activeDocument.compoundPathItems[k].fillColor.cyan == 0 && app.activeDocument.compoundPathItems[k].fillColor.magenta == 0 && app.activeDocument.compoundPathItems[k].fillColor.yellow == 0 && app.activeDocument.compoundPathItems[k].fillColor.black == 0 && app.activeDocument.compoundPathItems[k].fillOverprint == true && app.activeDocument.compoundPathItems[k].fillColor != "[None]") { app.activeDocument.compoundPathItems[k].selected = true; app.activeDocument.compoundPathItems[k].fillOverprint = false; } } if (app.activeDocument.compoundPathItems[k].strokeColor == "[CMYKColor]") { if (app.activeDocument.compoundPathItems[k].strokeColor.cyan == 0 && app.activeDocument.compoundPathItems[k].strokeColor.magenta == 0 && app.activeDocument.compoundPathItems[k].strokeColor.yellow == 0 && app.activeDocument.compoundPathItems[k].strokeColor.black == 0 && app.activeDocument.compoundPathItems[k].strokeOverprint == true && app.activeDocument.compoundPathItems[k].strokeColor != "[None]") { app.activeDocument.compoundPathItems[k].selected = true; app.activeDocument.compoundPathItems[k].strokeOverprint = false; } } if (app.activeDocument.compoundPathItems[k].fillColor == "[RGBColor]") { if (app.activeDocument.compoundPathItems[k].fillColor.red == 255 && app.activeDocument.compoundPathItems[k].fillColor.green == 255 && app.activeDocument.compoundPathItems[k].fillColor.blue == 255 && app.activeDocument.compoundPathItems[k].fillOverprint == true && app.activeDocument.compoundPathItems[k].fillColor != "[None]") { app.activeDocument.compoundPathItems[k].selected = true; app.activeDocument.compoundPathItems[k].fillOverprint = false; } } if (app.activeDocument.compoundPathItems[k].strokeColor == "[RGBColor]") { if (app.activeDocument.compoundPathItems[k].strokeColor.red == 255 && app.activeDocument.compoundPathItems[k].strokeColor.green == 255 && app.activeDocument.compoundPathItems[k].strokeColor.blue == 255 && app.activeDocument.compoundPathItems[k].strokeOverprint == true && app.activeDocument.compoundPathItems[k].strokeColor != "[None]") { app.activeDocument.compoundPathItems[k].selected = true; app.activeDocument.compoundPathItems[k].strokeOverprint = false; } } if (app.activeDocument.compoundPathItems[k].fillColor == "[GrayColor]") { if (app.activeDocument.compoundPathItems[k].fillColor.gray == 0 && app.activeDocument.compoundPathItems[k].fillOverprint == true && app.activeDocument.compoundPathItems[k].fillColor != "[None]") { app.activeDocument.compoundPathItems[k].selected = true; app.activeDocument.compoundPathItems[k].fillOverprint = false; } } if (app.activeDocument.compoundPathItems[k].strokeColor == "[GrayColor]" && app.activeDocument.compoundPathItems[k].strokeOverprint == true && app.activeDocument.compoundPathItems[k].strokeColor != "[None]") { if (app.activeDocument.compoundPathItems[k].strokeColor.gray == 0) { app.activeDocument.compoundPathItems[k].selected = true; app.activeDocument.compoundPathItems[k].strokeOverprint = false; } } } } for (var k = app.activeDocument.groupItems.length - 1; k > -1; k--) { if (app.activeDocument.groupItems[k].fillColor != "[SpotColor]") { if (app.activeDocument.groupItems[k].fillColor == "[CMYKColor]") { if (app.activeDocument.groupItems[k].fillColor.cyan == 0 && app.activeDocument.groupItems[k].fillColor.magenta == 0 && app.activeDocument.groupItems[k].fillColor.yellow == 0 && app.activeDocument.groupItems[k].fillColor.black == 0 && app.activeDocument.groupItems[k].fillOverprint == true && app.activeDocument.groupItems[k].fillColor != "[None]") { app.activeDocument.groupItems[k].selected = true; app.activeDocument.groupItems[k].fillOverprint = false; } } if (app.activeDocument.groupItems[k].strokeColor == "[CMYKColor]") { if (app.activeDocument.groupItems[k].strokeColor.cyan == 0 && app.activeDocument.groupItems[k].strokeColor.magenta == 0 && app.activeDocument.groupItems[k].strokeColor.yellow == 0 && app.activeDocument.groupItems[k].strokeColor.black == 0 && app.activeDocument.groupItems[k].strokeOverprint == true && app.activeDocument.groupItems[k].strokeColor != "[None]") { app.activeDocument.groupItems[k].selected = true; app.activeDocument.groupItems[k].strokeOverprint = false; } } if (app.activeDocument.groupItems[k].fillColor == "[RGBColor]") { if (app.activeDocument.groupItems[k].fillColor.red == 255 && app.activeDocument.groupItems[k].fillColor.green == 255 && app.activeDocument.groupItems[k].fillColor.blue == 255 && app.activeDocument.groupItems[k].fillOverprint == true && app.activeDocument.groupItems[k].fillColor != "[None]") { app.activeDocument.groupItems[k].selected = true; app.activeDocument.groupItems[k].fillOverprint = false; } } if (app.activeDocument.groupItems[k].strokeColor == "[RGBColor]") { if (app.activeDocument.groupItems[k].strokeColor.red == 255 && app.activeDocument.groupItems[k].strokeColor.green == 255 && app.activeDocument.groupItems[k].strokeColor.blue == 255 && app.activeDocument.groupItems[k].strokeOverprint == true && app.activeDocument.groupItems[k].strokeColor != "[None]") { app.activeDocument.groupItems[k].selected = true; app.activeDocument.groupItems[k].strokeOverprint = false; } } if (app.activeDocument.groupItems[k].fillColor == "[GrayColor]") { if (app.activeDocument.groupItems[k].fillColor.gray == 0 && app.activeDocument.groupItems[k].fillOverprint == true && app.activeDocument.groupItems[k].fillColor != "[None]") { app.activeDocument.groupItems[k].selected = true; app.activeDocument.groupItems[k].fillOverprint = false; } } if (app.activeDocument.groupItems[k].strokeColor == "[GrayColor]") { if (app.activeDocument.groupItems[k].strokeColor.gray == 0 && app.activeDocument.groupItems[k].strokeOverprint == true && app.activeDocument.groupItems[k].strokeColor != "[None]") { app.activeDocument.groupItems[k].selected = true; app.activeDocument.groupItems[k].strokeOverprint = false; } } } } win.close();}function showwhiteoverprint() { win.close(); for (var k = app.activeDocument.pathItems.length - 1; k > -1; k--) { if (app.activeDocument.pathItems[k].fillColor != "[SpotColor]") { if (app.activeDocument.pathItems[k].fillColor == "[CMYKColor]") { if (app.activeDocument.pathItems[k].fillColor.cyan == 0 && app.activeDocument.pathItems[k].fillColor.magenta == 0 && app.activeDocument.pathItems[k].fillColor.yellow == 0 && app.activeDocument.pathItems[k].fillColor.black == 0 && app.activeDocument.pathItems[k].fillOverprint == true && app.activeDocument.pathItems[k].fillColor != "[None]") { app.activeDocument.pathItems[k].selected = true; } } if (app.activeDocument.pathItems[k].strokeColor == "[CMYKColor]") { if (app.activeDocument.pathItems[k].strokeColor.cyan == 0 && app.activeDocument.pathItems[k].strokeColor.magenta == 0 && app.activeDocument.pathItems[k].strokeColor.yellow == 0 && app.activeDocument.pathItems[k].strokeColor.black == 0 && app.activeDocument.pathItems[k].strokeOverprint == true && app.activeDocument.pathItems[k].strokeColor != "[None]") { app.activeDocument.pathItems[k].selected = true; } } if (app.activeDocument.pathItems[k].fillColor == "[RGBColor]") { if (app.activeDocument.pathItems[k].fillColor.red == 255 && app.activeDocument.pathItems[k].fillColor.green == 255 && app.activeDocument.pathItems[k].fillColor.blue == 255 && app.activeDocument.pathItems[k].fillOverprint == true && app.activeDocument.pathItems[k].fillColor != "[None]") { app.activeDocument.pathItems[k].selected = true; } } if (app.activeDocument.pathItems[k].strokeColor == "[RGBColor]") { if (app.activeDocument.pathItems[k].strokeColor.red == 255 && app.activeDocument.pathItems[k].strokeColor.green == 255 && app.activeDocument.pathItems[k].strokeColor.blue == 255 && app.activeDocument.pathItems[k].strokeOverprint == true && app.activeDocument.pathItems[k].strokeColor != "[None]") { app.activeDocument.pathItems[k].selected = true; } } if (app.activeDocument.pathItems[k].fillColor == "[GrayColor]") { if (app.activeDocument.pathItems[k].fillColor.gray == 0 && app.activeDocument.pathItems[k].fillOverprint == true && app.activeDocument.pathItems[k].fillColor != "[None]") { app.activeDocument.pathItems[k].selected = true; } } if (app.activeDocument.pathItems[k].strokeColor == "[GrayColor]") { if (app.activeDocument.pathItems[k].strokeColor.gray == 0 && app.activeDocument.pathItems[k].strokeOverprint == true && app.activeDocument.pathItems[k].strokeColor != "[None]") { app.activeDocument.pathItems[k].selected = true; } } } } for (var k = app.activeDocument.compoundPathItems.length - 1; k > -1; k--) { if (app.activeDocument.compoundPathItems[k].fillColor != "[SpotColor]") { if (app.activeDocument.compoundPathItems[k].fillColor == "[CMYKColor]") { if (app.activeDocument.compoundPathItems[k].fillColor.cyan == 0 && app.activeDocument.compoundPathItems[k].fillColor.magenta == 0 && app.activeDocument.compoundPathItems[k].fillColor.yellow == 0 && app.activeDocument.compoundPathItems[k].fillColor.black == 0 && app.activeDocument.compoundPathItems[k].fillOverprint == true && app.activeDocument.compoundPathItems[k].fillColor != "[None]") { app.activeDocument.compoundPathItems[k].selected = true; } } if (app.activeDocument.compoundPathItems[k].strokeColor == "[CMYKColor]") { if (app.activeDocument.compoundPathItems[k].strokeColor.cyan == 0 && app.activeDocument.compoundPathItems[k].strokeColor.magenta == 0 && app.activeDocument.compoundPathItems[k].strokeColor.yellow == 0 && app.activeDocument.compoundPathItems[k].strokeColor.black == 0 && app.activeDocument.compoundPathItems[k].strokeOverprint == true && app.activeDocument.compoundPathItems[k].strokeColor != "[None]") { app.activeDocument.compoundPathItems[k].selected = true; } } if (app.activeDocument.compoundPathItems[k].fillColor == "[RGBColor]") { if (app.activeDocument.compoundPathItems[k].fillColor.red == 255 && app.activeDocument.compoundPathItems[k].fillColor.green == 255 && app.activeDocument.compoundPathItems[k].fillColor.blue == 255 && app.activeDocument.compoundPathItems[k].fillOverprint == true && app.activeDocument.compoundPathItems[k].fillColor != "[None]") { app.activeDocument.compoundPathItems[k].selected = true; } } if (app.activeDocument.compoundPathItems[k].strokeColor == "[RGBColor]") { if (app.activeDocument.compoundPathItems[k].strokeColor.red == 255 && app.activeDocument.compoundPathItems[k].strokeColor.green == 255 && app.activeDocument.compoundPathItems[k].strokeColor.blue == 255 && app.activeDocument.compoundPathItems[k].strokeOverprint == true && app.activeDocument.compoundPathItems[k].strokeColor != "[None]") { app.activeDocument.compoundPathItems[k].selected = true; } } if (app.activeDocument.compoundPathItems[k].fillColor == "[GrayColor]") { if (app.activeDocument.compoundPathItems[k].fillColor.gray == 0 && app.activeDocument.compoundPathItems[k].fillOverprint == true && app.activeDocument.compoundPathItems[k].fillColor != "[None]") { app.activeDocument.compoundPathItems[k].selected = true; } } if (app.activeDocument.compoundPathItems[k].strokeColor == "[GrayColor]") { if (app.activeDocument.compoundPathItems[k].strokeColor.gray == 0 && app.activeDocument.compoundPathItems[k].strokeOverprint == true && app.activeDocument.compoundPathItems[k].strokeColor != "[None]") { app.activeDocument.compoundPathItems[k].selected = true; } } } } for (var k = app.activeDocument.groupItems.length - 1; k > -1; k--) { if (app.activeDocument.groupItems[k].fillColor != "[SpotColor]") { if (app.activeDocument.groupItems[k].fillColor == "[CMYKColor]") { if (app.activeDocument.groupItems[k].fillColor.cyan == 0 && app.activeDocument.groupItems[k].fillColor.magenta == 0 && app.activeDocument.groupItems[k].fillColor.yellow == 0 && app.activeDocument.groupItems[k].fillColor.black == 0 && app.activeDocument.groupItems[k].fillOverprint == true && app.activeDocument.groupItems[k].fillColor != "[None]") { app.activeDocument.groupItems[k].selected = true; } } if (app.activeDocument.groupItems[k].strokeColor == "[CMYKColor]") { if (app.activeDocument.groupItems[k].strokeColor.cyan == 0 && app.activeDocument.groupItems[k].strokeColor.magenta == 0 && app.activeDocument.groupItems[k].strokeColor.yellow == 0 && app.activeDocument.groupItems[k].strokeColor.black == 0 && app.activeDocument.groupItems[k].strokeOverprint == true && app.activeDocument.groupItems[k].strokeColor != "[None]") { app.activeDocument.groupItems[k].selected = true; } } if (app.activeDocument.groupItems[k].fillColor == "[RGBColor]") { if (app.activeDocument.groupItems[k].fillColor.red == 255 && app.activeDocument.groupItems[k].fillColor.green == 255 && app.activeDocument.groupItems[k].fillColor.blue == 255 && app.activeDocument.groupItems[k].fillOverprint == true && app.activeDocument.groupItems[k].fillColor != "[None]") { app.activeDocument.groupItems[k].selected = true; } } if (app.activeDocument.groupItems[k].strokeColor == "[RGBColor]") { if (app.activeDocument.groupItems[k].strokeColor.red == 255 && app.activeDocument.groupItems[k].strokeColor.green == 255 && app.activeDocument.groupItems[k].strokeColor.blue == 255 && app.activeDocument.groupItems[k].strokeOverprint == true && app.activeDocument.groupItems[k].strokeColor != "[None]") { app.activeDocument.groupItems[k].selected = true; } } if (app.activeDocument.groupItems[k].fillColor == "[GrayColor]") { if (app.activeDocument.groupItems[k].fillColor.gray == 0 && app.activeDocument.groupItems[k].fillOverprint == true && app.activeDocument.groupItems[k].fillColor != "[None]") { app.activeDocument.groupItems[k].selected = true; } } if (app.activeDocument.groupItems[k].strokeColor == "[GrayColor]") { if (app.activeDocument.groupItems[k].strokeColor.gray == 0 && app.activeDocument.groupItems[k].strokeOverprint == true && app.activeDocument.groupItems[k].strokeColor != "[None]") { app.activeDocument.groupItems[k].selected = true; } } } }}function checkwhiteoverprint() { var checkwhiteoverprintcountfill = 0; var checkwhiteoverprintcountstroke = 0; for (var k = app.activeDocument.pathItems.length - 1; k > -1; k--) { if (app.activeDocument.pathItems[k].fillColor != "[SpotColor]") { if (app.activeDocument.pathItems[k].fillColor == "[CMYKColor]") { if (app.activeDocument.pathItems[k].fillColor.cyan == 0 && app.activeDocument.pathItems[k].fillColor.magenta == 0 && app.activeDocument.pathItems[k].fillColor.yellow == 0 && app.activeDocument.pathItems[k].fillColor.black == 0 && app.activeDocument.pathItems[k].fillOverprint == true && app.activeDocument.pathItems[k].fillColor != "[None]") { checkwhiteoverprintcountfill = checkwhiteoverprintcountfill 1; } } if (app.activeDocument.pathItems[k].strokeColor == "[CMYKColor]") { if (app.activeDocument.pathItems[k].strokeColor.cyan == 0 && app.activeDocument.pathItems[k].strokeColor.magenta == 0 && app.activeDocument.pathItems[k].strokeColor.yellow == 0 && app.activeDocument.pathItems[k].strokeColor.black == 0 && app.activeDocument.pathItems[k].strokeOverprint == true && app.activeDocument.pathItems[k].strokeColor != "[None]") { checkwhiteoverprintcountstroke = checkwhiteoverprintcountstroke 1; } } if (app.activeDocument.pathItems[k].fillColor == "[RGBColor]") { if (app.activeDocument.pathItems[k].fillColor.red == 255 && app.activeDocument.pathItems[k].fillColor.green == 255 && app.activeDocument.pathItems[k].fillColor.blue == 255 && app.activeDocument.pathItems[k].fillOverprint == true && app.activeDocument.pathItems[k].fillColor != "[None]") { checkwhiteoverprintcountfill = checkwhiteoverprintcountfill 1; } } if (app.activeDocument.pathItems[k].strokeColor == "[RGBColor]") { if (app.activeDocument.pathItems[k].strokeColor.red == 255 && app.activeDocument.pathItems[k].strokeColor.green == 255 && app.activeDocument.pathItems[k].strokeColor.blue == 255 && app.activeDocument.pathItems[k].strokeOverprint == true && app.activeDocument.pathItems[k].strokeColor != "[None]") { checkwhiteoverprintcountstroke = checkwhiteoverprintcountstroke 1; } } if (app.activeDocument.pathItems[k].fillColor == "[GrayColor]") { if (app.activeDocument.pathItems[k].fillColor.gray == 0 && app.activeDocument.pathItems[k].fillOverprint == true && app.activeDocument.pathItems[k].fillColor != "[None]") { checkwhiteoverprintcountfill = checkwhiteoverprintcountfill 1; } } if (app.activeDocument.pathItems[k].strokeColor == "[GrayColor]") { if (app.activeDocument.pathItems[k].strokeColor.gray == 0 && app.activeDocument.pathItems[k].strokeOverprint == true && app.activeDocument.pathItems[k].strokeColor != "[None]") { checkwhiteoverprintcountstroke = checkwhiteoverprintcountstroke 1; } } } } for (var k = app.activeDocument.compoundPathItems.length - 1; k > -1; k--) { if (app.activeDocument.compoundPathItems[k].fillColor != "[SpotColor]") { if (app.activeDocument.compoundPathItems[k].fillColor == "[CMYKColor]") { if (app.activeDocument.compoundPathItems[k].fillColor.cyan == 0 && app.activeDocument.compoundPathItems[k].fillColor.magenta == 0 && app.activeDocument.compoundPathItems[k].fillColor.yellow == 0 && app.activeDocument.compoundPathItems[k].fillColor.black == 0 && app.activeDocument.compoundPathItems[k].fillOverprint == true && app.activeDocument.compoundPathItems[k].fillColor != "[None]") { checkwhiteoverprintcountfill = checkwhiteoverprintcountfill 1; } } if (app.activeDocument.compoundPathItems[k].strokeColor == "[CMYKColor]") { if (app.activeDocument.compoundPathItems[k].strokeColor.cyan == 0 && app.activeDocument.compoundPathItems[k].strokeColor.magenta == 0 && app.activeDocument.compoundPathItems[k].strokeColor.yellow == 0 && app.activeDocument.compoundPathItems[k].strokeColor.black == 0 && app.activeDocument.compoundPathItems[k].strokeOverprint == true && app.activeDocument.compoundPathItems[k].strokeColor != "[None]") { checkwhiteoverprintcountstroke = checkwhiteoverprintcountstroke 1; } } if (app.activeDocument.compoundPathItems[k].fillColor == "[RGBColor]") { if (app.activeDocument.compoundPathItems[k].fillColor.red == 255 && app.activeDocument.compoundPathItems[k].fillColor.green == 255 && app.activeDocument.compoundPathItems[k].fillColor.blue == 255 && app.activeDocument.compoundPathItems[k].fillOverprint == true && app.activeDocument.compoundPathItems[k].fillColor != "[None]") { checkwhiteoverprintcountfill = checkwhiteoverprintcountfill 1; } } if (app.activeDocument.compoundPathItems[k].strokeColor == "[RGBColor]") { if (app.activeDocument.compoundPathItems[k].strokeColor.red == 255 && app.activeDocument.compoundPathItems[k].strokeColor.green == 255 && app.activeDocument.compoundPathItems[k].strokeColor.blue == 255 && app.activeDocument.compoundPathItems[k].strokeOverprint == true && app.activeDocument.compoundPathItems[k].strokeColor != "[None]") { checkwhiteoverprintcountstroke = checkwhiteoverprintcountstroke 1; } } if (app.activeDocument.compoundPathItems[k].fillColor == "[GrayColor]") { if (app.activeDocument.compoundPathItems[k].fillColor.gray == 0 && app.activeDocument.compoundPathItems[k].fillOverprint == true && app.activeDocument.compoundPathItems[k].fillColor != "[None]") { checkwhiteoverprintcountfill = checkwhiteoverprintcountfill 1; } } if (app.activeDocument.compoundPathItems[k].strokeColor == "[GrayColor]") { if (app.activeDocument.compoundPathItems[k].strokeColor.gray == 0 && app.activeDocument.compoundPathItems[k].strokeOverprint == true && app.activeDocument.compoundPathItems[k].strokeColor != "[None]") { checkwhiteoverprintcountstroke = checkwhiteoverprintcountstroke 1; } } } } for (var k = app.activeDocument.groupItems.length - 1; k > -1; k--) { if (app.activeDocument.groupItems[k].fillColor != "[SpotColor]") { if (app.activeDocument.groupItems[k].fillColor == "[CMYKColor]") { if (app.activeDocument.groupItems[k].fillColor.cyan == 0 && app.activeDocument.groupItems[k].fillColor.magenta == 0 && app.activeDocument.groupItems[k].fillColor.yellow == 0 && app.activeDocument.groupItems[k].fillColor.black == 0 && app.activeDocument.groupItems[k].fillOverprint == true && app.activeDocument.groupItems[k].fillColor != "[None]") { checkwhiteoverprintcountfill = checkwhiteoverprintcountfill 1; } } if (app.activeDocument.groupItems[k].strokeColor == "[CMYKColor]") { if (app.activeDocument.groupItems[k].strokeColor.cyan == 0 && app.activeDocument.groupItems[k].strokeColor.magenta == 0 && app.activeDocument.groupItems[k].strokeColor.yellow == 0 && app.activeDocument.groupItems[k].strokeColor.black == 0 && app.activeDocument.groupItems[k].strokeOverprint == true && app.activeDocument.groupItems[k].strokeColor != "[None]") { checkwhiteoverprintcountstroke = checkwhiteoverprintcountstroke 1; } } if (app.activeDocument.groupItems[k].fillColor == "[RGBColor]") { if (app.activeDocument.groupItems[k].fillColor.red == 255 && app.activeDocument.groupItems[k].fillColor.green == 255 && app.activeDocument.groupItems[k].fillColor.blue == 255 && app.activeDocument.groupItems[k].fillOverprint == true && app.activeDocument.groupItems[k].fillColor != "[None]") { checkwhiteoverprintcountfill = checkwhiteoverprintcountfill 1; } } if (app.activeDocument.groupItems[k].strokeColor == "[RGBColor]") { if (app.activeDocument.groupItems[k].strokeColor.red == 255 && app.activeDocument.groupItems[k].strokeColor.green == 255 && app.activeDocument.groupItems[k].strokeColor.blue == 255 && app.activeDocument.groupItems[k].strokeOverprint == true && app.activeDocument.groupItems[k].strokeColor != "[None]") { checkwhiteoverprintcountstroke = checkwhiteoverprintcountstroke 1; } } if (app.activeDocument.groupItems[k].fillColor == "[GrayColor]") { if (app.activeDocument.groupItems[k].fillColor.gray == 0 && app.activeDocument.groupItems[k].fillOverprint == true && app.activeDocument.groupItems[k].fillColor != "[None]") { checkwhiteoverprintcountfill = checkwhiteoverprintcountfill 1; } } if (app.activeDocument.groupItems[k].strokeColor == "[GrayColor]") { if (app.activeDocument.groupItems[k].strokeColor.gray == 0 && app.activeDocument.groupItems[k].strokeOverprint == true && app.activeDocument.groupItems[k].strokeColor != "[None]") { checkwhiteoverprintcountstroke = checkwhiteoverprintcountstroke 1; } } } } totallistfill = "填充: " checkwhiteoverprintcountfill; totalliststroke = "描边: " checkwhiteoverprintcountstroke; res = "dialog { ntttext:'查找白色叠印', nttproperties:{ closeOnKey:'OSCmnd W', resizeable:false}, ntttallGroups: Panel { orientation:'stack', preferredSize: [250, 20] nttttext: '白色叠印:', ntttjobinformation: Group { orientation: 'column', alignment: 'left', ntttttcount: Group { orientation: 'row', alignment: 'left', ntttttscountfill: StaticText { text:'" totallistfill "', alignment: 'left' }, ntttttscountstroke: StaticText { text:'" totalliststroke "', alignment: 'left' }, nttttt} nttt}, nttt}, ntttbuttons: Group { orientation: 'row', alignment: 'center', ntttcancelBtn: Button { text:'取消', properties:{name:'cancel'} }, ntttshowBtn: Button { text:'显示', properties:{name:'show'} }, ntttokBtn: Button { text:'去除白色叠印', properties:{name:'ok'} }, nttt} ntt} nt}"; win = new Window(res); win.frameLocation = [100, 100]; win.buttons.okBtn.onClick = function() { whiteoverprint(); }; win.buttons.showBtn.onClick = function() { showwhiteoverprint(); }; win.center(); win.show();}2.使用方式

AI源代码转执行脚本

>文章引用至 作者联系方式

以上内容为【怎么制作ai插件丨ai标签形状插件】的相关内容,更多相关内容关注lot物联网。

LOT物联网

iot产品 iot技术 iot应用 iot工程

Powered By LOT物联网  闽ICP备2024036174号-1

联系邮箱:support1012@126.com