var opt=new IllustratorSaveOptions(); opt.compressed=false; var savefile=new File("~/Desktop/myImageData1.ai"); app.activeDocument.saveAs(savefile, opt); opt.compressed=true; var savefile=new File("~/Desktop/myImageData2.ai"); app.activeDocument.saveAs(savefile, opt);