Copy link to clipboard
Copied
I am fairly new to Illustrator (less than 6 months) but I have managed to teach my self the basics to do what I need to do. I complete checking and minor editing of about 100 illustrator files a week for a client of mine, each of which needs to be saved in 5 differnt formats. Currently I am using the commands SAVE, SAVE AS, and SAVE FOR WEB (x3) to save the files in the original folder and to overwrite the existing file in there (all formats already exist in the original folder). I have done some research and belive that this process could be done automatically using a script. I have also tried to understand the coding language but it honestly goes right over my head. Can any one provide any assistance as to how I could write a script to do all the saving or possible point me in the direction of a simialr script that could be modified to suit my needs? Thanks in advance for any help.
Copy link to clipboard
Copied
There are some snippets you can use...
//save as
var f = New File("-/Desktop/saveAsFileName.ai");
app.activeDocument.saveAs(f);
//save for web
var doc = app.documents[0];
var assets = doc.assets;
var expOptions = new ExportForScreensItemToExport();
expOptions.artboards = 'all';
expOptions.document = true;
var jpegParam = new ExportForScreensOptionsJPEG();
jpegParam.compressionMethod = JPEGCompressionMethodType.PROGRESSIVE;
jpegParam.antiAliasing = AntiAliasingMethod.None;
jpegParam.embedICCProfile = true;
jpegParam.scaleType = ExportForScreensScaleType.SCALEBYFACTOR;
jpegParam.scaleTypeValue = 3;
var fdr=new Folder("~/Desktop/exportFolder/");
doc.exportForScreens(fdr, ExportForScreensType.SE_JPEG80, jpegParam, expOptions, "JPEG80_");
Copy link to clipboard
Copied
@Ten A
can i ask where you got these references from. Ive been searching for this for hours. This is not in their own official documentation. The latest scripting guides are from cc 2017 and basically have dinosaur code in them 😞
Copy link to clipboard
Copied
You can find the latest references in adobe.io. However, exportForScreens not documented.
If you can use ESTK, You can refer Object Model Viewer. However, the first arg is a Folder object.
Copy link to clipboard
Copied
Where can i find this ESTK, this is old right?
Copy link to clipboard
Copied
I foudn it here, i already had i seemed. i was using estk for search, that didnt work
https://github.com/Adobe-CEP/CEP-Resources
I do wonder now i can get more info to show as your screenshot does. I see you have illustrator 24, mine shows 25
EDIT
i found it, its a bit in riddle form as usual. Still dont see the how we can set real width and height as the export for screen dialog shows.
Copy link to clipboard
Copied
check the other thread where you ask about it
https://community.adobe.com/t5/illustrator/export-jpg-as-300-ppi/td-p/11244200
Copy link to clipboard
Copied
Thanks! i wasnt sure who would respond, so i search further.
One thing i noticed with that OLD ESTK tool, on OSX i dont see that search function the window variant has. Also after a restart i wont load anymore. I remember this issue from quite a while back. But installed it again today, it started and after that it simply quits. Perhaps it due to me having VIsual Studio code open, i havent tried that yet.
Copy link to clipboard
Copied
that's correct, VS needs to be closed for the ESTK to work
Copy link to clipboard
Copied
ahhh i was thinking that this afternoon, thanks for the confirmation. Will try that tomorrow