var savefile=new File("~/Desktop/exp.fxg"); var exportOptions = new FXGSaveOptions(); exportOptions.artboardRange = "1-3"; app.activeDocument.saveAs(savefile, exportOptions);