论坛帮助 |
社区圈子 |
日历事件 |
2024-06-28, 10:18 | #1 | ||
|
|||
正式会员
等级: 四袋长老
|
之前发的贴子没大佬整,现在我自己整了个范围在AI2021好了;但发现在AI2024打开文件后颜色变专色号了,怎么把这个色号的填充描边也给加上?有大佬改一下吗?酬谢! doc = app.activeDocument; newCMYKColor = new CMYKColor(); newCMYKColor.cyan = 100; newCMYKColor.magenta = 70; newCMYKColor.yellow = 0; newCMYKColor.black = 0; //RGB改CMYK模式 if (app.activeDocument.documentColorSpace == DocumentColorSpace.RGB) { app.executeMenuCommand('doc-color-cmyk') } for (var i = 0; i < doc.pathItems.length; i += 1) { pathArt = doc.pathItems[i]; if ((pathArt.fillColor.cyan >= 8 && pathArt.fillColor.cyan < 12)|| (pathArt.fillColor.yellow >= 80 && pathArt.fillColor.yellow < 84)) { pathArt.fillColor = newCMYKColor; } if ((pathArt.strokeColor.cyan >= 8 && pathArt.strokeColor.cyan < 12)|| (pathArt.strokeColor.yellow >= 80 && pathArt.strokeColor.yellow < 84)) { pathArt.strokeColor = newCMYKColor; } } if (app.documents.length > 0) { for (var i = 0; i < app.activeDocument.textFrames.length; i += 1) { textArtRange = app.activeDocument.textFrames[i].textRange; textArtRange.characterAttributes.textFont = app.textFonts.getByName("NSimSun"); } } |
||
回复时引用此帖 |