Fernando M. answered 04/05/23
Tutor
New to Wyzant
function your_script() {
// copy script here or include the jsx file:
# include '~/Desktop/script/your_script.jsx'
}
function main() {
var folder = Folder.selectDialog('Please, select the folder');
if (!(folder instanceof Folder)) return;
var files = folder.getFiles('*.ai');
if (files.length == 0) {
alert('Folder doesn\'t content AI files');
return;
}
var i = files.length;
while (i--) {
var doc = app.open(files[i]);
your_script(); // <------- here your script is running
doc.save();
doc.close();
}
alert(files.length + ' files were processed');
}
main();