This is the section for the save script; I've removed the names for the desktop section along with the location of their desktops
//created by Daryl Smith //opens a window that shows the different save options with radio buttons for save as is or save with new name //and it has two check boxes so that the user can choose to save a copy to their desktop and/or a copy to the print folder //for the direct to screen printer. #target illustrator var savewindow = new Window ("dialog", "Select Save Options"); var saveradio_group = savewindow.add ("panel",undefined, "Select Save Method"); saveradio_group.alignChildren = "left"; saveradio_group.size = [260,80]; var saveold = saveradio_group.add ("radiobutton", undefined, "Save with Current Name"); var savenew = saveradio_group.add ("radiobutton", undefined, "Save with New Name"); var extraSaveOptions = savewindow.add ("panel",undefined, "Save Extra Copy"); extraSaveOptions.alignChildren = "left"; extraSaveOptions.size = [260,80]; var checkbox1 = extraSaveOptions.add ("checkbox", undefined, "Save extra copy as .eps to STE_Art folder"); var checkbox2 = extraSaveOptions.add ("checkbox", undefined, "Save extra copy as .pdf to my desktop"); saveradio_group.children[0].value = true; savewindow.add ("button", undefined, "OK"); var saved = false; function selected_rbutton (saveradio_group) { for (var i = 0; i < saveradio_group.children.length; i++) if (saveradio_group.children[i].value == true) return saveradio_group.children[i].text; } if (savewindow.show () == 1) var selBut = selected_rbutton (saveradio_group); if (checkbox1.value == true) { var eso1 = "yes"; } if (checkbox1.value == false) { var eso1 = "no"; } if (checkbox2.value == true) { var eso2 = "yes"; } if (checkbox2.value == false) { var eso2 = "no"; } var confirmed = confirm ("Save option is [ " + selBut + " ]" + "\nYou chose [ " + eso1 + " ] to save a .eps copy to the new printer folder" + "\nYou chose [ " + eso2 + " ] to save a .pdf to your desktop" + "\n" + "\nContinue?") confirm.noAsDflt == false; if (confirmed == true) { //alert ("confirmed is true" +"\n" + saveold.value + "\n" + savenew.value) if (saveold.value == true) { var saved = true; var saveOldname = new File("S:/Art/ArtDept/Illustrator JS Palette/Scripts/Art Share Server/Save/Art Share.jsx"); saveOldname.open("r"); var bt = new BridgeTalk; bt.target = "illustrator"; var script = saveOldname.read(); saveOldname.close(); bt.body = script; bt.send(); saveFileToPDF(); saveFileToEPS(); }//end save old if (savenew.value == true) { var saved = true; var saveNewname = new File("S:/Art/ArtDept/Illustrator JS Palette/Scripts/Art Share Server/Save/File Save.jsx"); saveNewname.open("r"); var bt = new BridgeTalk; bt.target = "illustrator"; var script = saveNewname.read(); saveNewname.close(); bt.body = script; bt.send(); saveFileToPDF(); saveFileToEPS(); }//end save new }//end if confirmed check function saveFileToEPS() // saves the file to the server as a .EPS document. { var thisDoc = app.activeDocument; if ( app.documents.length > 0 ) { if (checkbox1.value == true) { alert ("Your said [ " + checkbox1.value + " ] to save extra copy as .eps to STE_Art folder") var saveName = new File ("S:/Art/ArtDept/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 ); }//end if }//end function savepdf }//end if checkbox1 function saveFileToPDF () // saves the file to the server as a .PDF document. { if (checkbox2.value == true) { //alert ("Your said [ " + checkbox2.value + " ] to save extra copy as .pdf to my desktop" + globalartistname) var globalartistname = "drs"; var thisDoc = app.activeDocument; if ( app.documents.length > 0 ) { var filename = app.activeDocument.name.replace(/\.[^\.]+$/, ''); switch (globalartistname) { THIS IS THE AREA WHERE THE NAMES AND LOCATIONS OF THE USERS DESKTOPS WOULD GO, GLOBAL ARTIST IS A VARIABLE THAT IS ENTERED WHEN ILLUSTRATOR FIRST OPENS AND IS USED BY A LOT OF THE OTHER SCRIPTS. saveOpts = new PDFSaveOptions(); saveOpts.compatibility = PDFCompatibility.ACROBAT6; saveOpts.generateThumbnails = true; saveOpts.preserveEditability = true; thisDoc.saveAs( saveName, saveOpts ); }//end if }//end function }//end if checkbox2
The two scripts for the save old name and save new name are exactly what it sounds like, one saves it with its current name and the other has a prompt for the name to be entered.