哪位大神有AI存成EPS格式带版面尺寸的脚本或插件
哪位大神有AI存成EPS格式带版面尺寸文件名的脚本或插件,或者能将一个文件里的多个版面存为EPS格式自带有版面尺寸文件名的方法,最好能支持CS6版面的,谢谢补充内容 (2021-11-29 15:11):
或者以画版尺寸来批量命名画版的脚本或插件也可 这种插件需要定制开发,大神的劳动也应该得到尊重,请带价咨询 chan5423 发表于 2021-11-29 17:37
这种插件需要定制开发,大神的劳动也应该得到尊重,请带价咨询
发出来可以购买:loveliness: 从别人现成的库里搬过来的批量EPS,拿去改改就可以用,根据个人需求增加具体的批量命名,比较简单的
*/
var inputFolder
var outputFolder
var currentFile
var matchFileType = '*.ai'
var fileFormats = [
{
name: 'PNG',
extension: '.png',
getOptions: function() {
var options = new ExportOptionsPNG24()
options.horizontalScale = 100.0
options.verticalScale = 100.0
options.antiAliasing = true
options.artBoardClipping = true
options.saveAsHTML = false
options.transparency = true
return options
},
saveFile: function(doc) {
doc.exportFile(getNewName(doc.name, this), ExportType.PNG24, this.getOptions())
}
}, {
name: 'SVG',
extension: '.svg',
getOptions: function() {
var options = new ExportOptionsSVG()
options.embedRasterImages = true
options.fontType = SVGFontType.OUTLINEFONT
return options
},
saveFile: function(doc) {
doc.exportFile(getNewName(doc.name, this), ExportType.SVG, this.getOptions())
}
}, {
name: 'EPS',
extension: '.eps',
getOptions: function() {
var options = new EPSSaveOptions()
options.embedAllFonts = true
options.embedLinkedFiles = true
return options
},
saveFile: function(doc) {
doc.saveAs(getNewName(doc.name, this), this.getOptions());
}
}
]
function getNewName(name, format) {
var newFolder = Folder(outputFolder + '/' + format.name);
if (!newFolder.exists) {
newFolder.create();
}
var newName = name.substr(0, name.lastIndexOf('.'));
newName += format.extension;
saveInFile = new File(newFolder + '/' + newName);
return saveInFile;
}
function getInput() {
inputFolder = Folder.selectDialog( 'Select the folder with Illustrator files you want to convert to PNG', '~' )
}
function pickFormats() {
var win = new Window('dialog', 'Converter');
win.alignChildren = 'fill';
win.input = win.add('group', undefined)
win.input.title = win.input.add('statictext', undefined, 'Select input folder')
win.input.browseButton = win.input.add('button', undefined, 'Browse')
win.inputPath = win.add('statictext', undefined, '', {truncate: 'middle'})
win.output = win.add('group', undefined)
win.output.title = win.output.add('statictext', undefined, 'Select output folder')
win.output.browseButton = win.output.add('button', undefined, 'Browse')
win.outputPath = win.add('statictext', undefined, '', {truncate: 'middle'})
win.checkboxes = win.add('panel', undefined, 'Formats')
win.checkboxes.orientation = 'row'
for (var i = 0; i < fileFormats.length; i++) {
win.checkboxes.name] = win.checkboxes.add('checkbox', undefined, fileFormats.name)
}
win.buttons = win.add('group', undefined)
win.buttons.alignment = 'center'
win.buttons.cancelButton = win.buttons.add('button', undefined, 'Cancel')
win.buttons.convertButton = win.buttons.add('button', undefined, 'Convert')
win.input.browseButton.onClick = function() {
getInput()
win.inputPath.text = inputFolder.getRelativeURI()
};
win.output.browseButton.onClick = function() {
getOutput()
win.outputPath.text = outputFolder.getRelativeURI()
};
win.buttons.convertButton.onClick = function() {
var checkBoxValues = []
if (inputFolder != null && outputFolder != null) {
for (var i = 0; i < fileFormats.length; i++) {
checkBoxValues.push(win.checkboxes.name].value)
}
convert(checkBoxValues)
win.close()
}
};
win.buttons.cancelButton.onClick = function() {
win.close()
};
win.show();
}
function convert(checkBoxValues) {
var files = new Array()
files = inputFolder.getFiles(matchFileType)
if (files.length > 0) {
for (var i = 0; i < files.length; i++) {
currentFile = app.open(files)
for (var j = 0; j < fileFormats.length; j++) {
if (checkBoxValues == 1) {
fileFormats.saveFile(currentFile)
}
}
currentFile.close(SaveOptions.DONOTSAVECHANGES)
}
}
}
function getInput() {
inputFolder = Folder.selectDialog( 'Select the SOURCE folder...', '~' );
if (outputFolder == null) {
outputFolder = inputFolder;
}
}
function getOutput() {
outputFolder = Folder.selectDialog( 'Select the DESTINATION folder...', '~' );
}
pickFormats();
xj2020 发表于 2021-11-29 20:58
从别人现成的库里搬过来的批量EPS,拿去改改就可以用,根据个人需求增加具体的批量命名,比较简单的
亲,能帮改改吗,能支持CS6版本的,谢谢:)
页:
[1]