Hello fellow scripters,
I've got a script that I wrote that works great, no issues from it but we are making some changes and we are going to have to be printing different art boards than just Art board 1. How would I have the script print what ever art board is selected at the time the script is ran? Is there something like this;
var artBoardCount = artboardRange; for(i=0; i < artBoardCount, i++) { if (artboart[i].active = true) { function saveFileToEPS() // saves the file to the server as a .EPS document. { var thisDoc = app.activeDocument; if ( app.documents.length > 0 ) { var saveName = new File ("Z:/STE2/STE2_ArtBags"); saveOpts = new EPSSaveOptions(); saveOpts.compatibility = Compatibility.ILLUSTRATOR13; saveOpts.generateThumbnails = true; saveOpts.preserveEditability = true; saveOpts.artBoardClipping = true; saveOpts.saveMultipleArtboards = true; saveOpts.artboardRange = [i]; // artboard number thisDoc.saveAs( saveName, saveOpts ); } }
I can't figure out how to get the art board total count for the for loop and how to tell what the currently active art board is. The script that I currently run is below;
// Save the open file to the new direct to print folder as EPS with artboard enabled. #target illustrator; saveFileToEPS(); var w = new Window("palette","Saved To STE Printer",undefined,{closeButton:false}); w.add("statictext",undefined,"File has been saved to STE Printer"); w.show(); $.sleep(1500); w.close(); function saveFileToEPS() // saves the file to the server as a .EPS document. { var thisDoc = app.activeDocument; if ( app.documents.length > 0 ) { var saveName = new File ("Z:/STE2/STE2_ArtBags"); saveOpts = new EPSSaveOptions(); saveOpts.compatibility = Compatibility.ILLUSTRATOR13; saveOpts.generateThumbnails = true; saveOpts.preserveEditability = true; saveOpts.artBoardClipping = true; saveOpts.saveMultipleArtboards = true; saveOpts.artboardRange = "1"; // artboard # 1 thisDoc.saveAs( saveName, saveOpts ); } }
Many thanks in advance for any help.