I am trying to make a quick "save as" flow to save down Creative Cloud Illustrator files to CS6.
I am pretty close, if I replace the path to the Desktop for the destination file, it will resave my file to the desktop. I thought if I replaced it with the $outfolder, it would place it in the output folder with the same file name. Instead the script just errors out.
iDoc=app.activeDocument;
var destfile = new File($outfolder);
var aisaveOptions = new IllustratorSaveOptions();
aisaveOptions.compatibility = Compatibility.ILLUSTRATOR16;
iDoc.saveAs (destfile, aisaveOptions);
Save as CS6 from CC
Save as CS6 from CC
Ok this has got me a little closer, it will create the temp file on the desktop, but it will not move it to the final folder of the flow.
Failed to place job '_0CIP5_Untitled-1.ai' in folder 'Output'
$Doc=app.activeDocument;
var tempfile = new File("/Users/wfadmin/Desktop/" + $filename + ".ai");
var aisaveOptions = new IllustratorSaveOptions();
aisaveOptions.compatibility = Compatibility.ILLUSTRATOR16;
$Doc.saveAs (tempfile, aisaveOptions);
$outfiles = []
$outfiles.push(tempfile);
$doc.close;
Failed to place job '_0CIP5_Untitled-1.ai' in folder 'Output'
$Doc=app.activeDocument;
var tempfile = new File("/Users/wfadmin/Desktop/" + $filename + ".ai");
var aisaveOptions = new IllustratorSaveOptions();
aisaveOptions.compatibility = Compatibility.ILLUSTRATOR16;
$Doc.saveAs (tempfile, aisaveOptions);
$outfiles = []
$outfiles.push(tempfile);
$doc.close;
Save as CS6 from CC
Do not set $doc to app.activeDocument, and certainly not $Doc.
It will work when you write the output to your Desktop, but it is cleaner to use $outfolder. Check the part on "Javascript for applications" in the Help to find an overview of all the variables you should use.
Freddy
It will work when you write the output to your Desktop, but it is cleaner to use $outfolder. Check the part on "Javascript for applications" in the Help to find an overview of all the variables you should use.
Freddy