27 Replies Latest reply on Feb 22, 2012 9:34 AM by NateO12

    Printing only certain colors to Postscript [JS, CS3]

    NateO12 Level 1

      Is there a way, via a script, to only output certain ink colors when printing to a Postscript file? When doing it manually you can choose which colors to output, but I haven't been able to find any way to do that through a script. Any ideas?

        • 1. Re: Printing only certain colors to Postscript [JS, CS3]
          Laubender Adobe Community Professional & MVP

          Without looking thoroughly to that issue, do you speak of color separation here?

          If yes, you can choose individually not to print  CMYK colors in the printer preset.

           

          For color "Black" that is:

           

          yourPrinterPreset.printBlack = false //or "true" if you prefer to separate it
          

           

          For special colors you have to define and prepare a custom printer preset in the UI and later use it in your script.

           

          Uwe

          • 2. Re: Printing only certain colors to Postscript [JS, CS3]
            NateO12 Level 1

            Hmmm I'll have to give that a try. That looks like it might work. Of course the method for getting special colors to work worries me as that would end up being way too many presets. Might have to explore creating some kind of pompt that lets them pick the colors they want to output. I realize that sounds an awful lot like what already exists in the print dialog box but even saving a few seconds per document is worth it. Thanks.

             

            Nate

            • 3. Re: Printing only certain colors to Postscript [JS, CS3]
              NateO12 Level 1

              Maybe I should see if what I want to do is even possible. In the end I'd like to be able to run a script that would find the colors on a document, prompt the user to put a checkmark next to the colors they want to output, and then print those colors to a Postscript file. So if I have a document with black, PMS 185 and registration, I want the prompt to allow me to put a checkmark next to PMS185 and registration, but no checkmark for black. The resulting Postscript file would consist of just the PMS185 and registration. Does that sound remotely possible?

               

              Nate

              • 4. Re: Printing only certain colors to Postscript [JS, CS3]
                [Jongware] Most Valuable Participant

                Browsing through PrintPreference and PrinterPresets, I don't see anything scriptable for custom inks. (As it happens, your example for Black *would* work but only because it's one of the primary colors).

                 

                You can check http://jongware.mit.edu/idcsjs5.5/pc_PrintPreference.html and http://jongware.mit.edu/idcsjs5.5/pc_PrinterPreset.html and see if I overlooked something.

                • 5. Re: Printing only certain colors to Postscript [JS, CS3]
                  Gonterman1201 Level 1

                  If you ever figure out how to get to the ink manager via javascript let me know. I would like to set the ink density for all of our inks. You can only manage the inks that are in your document.

                  • 6. Re: Printing only certain colors to Postscript [JS, CS3]
                    Muppet Mark Level 5

                    Its been a long time since I worked with postscript files & separations… However output registration I don't think that's correct… It's like a app reserved mixed ink anything marked with this will be on every separation and NOT it's own?

                    • 7. Re: Printing only certain colors to Postscript [JS, CS3]
                      Muppet Mark Level 5

                      I think the answer to your question and the original question is in the document inks…

                       

                      printInkboolr/wIf true, prints the ink. Only valid when printing separations.
                      neutralDensitynumber (range: 0.001 - 10)r/wThe neutral density of the ink. (Range: 0.001 to 10.0)
                      1 person found this helpful
                      • 8. Re: Printing only certain colors to Postscript [JS, CS3]
                        Laubender Adobe Community Professional & MVP

                        @Nate – And be aware that you cannot leave colors alone when printing by composite workflow.

                        This all applies to output separations. (Oh. Muppet Mark already pointed that out!)

                         

                        There could be a slim chance to delete all your unwanted separations after printing to PostScript by using Acrobat Distiller and setting up some pdfmark instructions in the process to generate PDF. Or delete your unwanted separations by JavaScript in Acrobat Pro.

                         

                        If your ouput device that you want to print PostScript to is able to understand pdfmark instructions, you even could place a EPS with pdfmark instructions by scripting on pages in InDesign and control the printer that way.

                         

                        Uwe

                        • 11. Re: Printing only certain colors to Postscript [JS, CS3]
                          NateO12 Level 1

                          You guys have been a huge help so far! I need a little direction though. As it sits now I have the script checking the colors, and popping up a dialog box with the color name and a checkbox in front of each color. However, I have to explicitly put code in for each checkbox. It's not dynamic at all. What's worse is that it seems to remember the colors on a new document, i.e., Process Cyan, Process Magenta, etc, not the colors I actually have on my document. I know there is an unusedSwatches command, but is there anything for 'usedSwatches' or 'usedInks'? I'd still have to worry about the script figuring out how to display 2 colors one time and 3 or 4 the next time it runs, but I'll leave that until later. Thanks for the help so far!

                           

                          Nate

                           

                          Edit: If I do myDocument.swatches I can list just the colors on the document. However, I'm not sure how the swatch names correlate to the actual ink.

                          • 12. Re: Printing only certain colors to Postscript [JS, CS3]
                            Gonterman1201 Level 1

                            I think this is a bit trick because there is ink and then there are swatches. The Cyan, Magenta, Yellow and Black show up if I use ink. However if I am just looking at the swatches it shows up with a name like C68 M100 Y0 K24.

                            For example:

                             

                            myDocument=app.activeDocument;

                            densityChange();

                            function densityChange(){

                            for (i=0; i<myDocument.swatches.length; i++){

                                            name = myDocument.swatches[i].name;

                                 alert(name);

                                 }

                            }

                             

                            This will give me the swatch name like I mentioned. C68 M100 Y0 K24.

                             

                            This however will give me Cyan Yellow Magenta Black plus watever spot colors I am using.

                             

                            For me in order to adjust the neutral density I need ink.

                             

                             

                            for (i=0; i<myDocument.inks.length; i++){

                                            name = myDocument.inks[i].name;

                                         

                                

                                 alert(name);

                                 }

                            }

                            • 13. Re: Printing only certain colors to Postscript [JS, CS3]
                              Gonterman1201 Level 1

                              Thank you Muppet. You have helped alot.

                              • 14. Re: Printing only certain colors to Postscript [JS, CS3]
                                [Jongware] Most Valuable Participant

                                Don't go confusing swatches and inks!

                                 

                                A swatch can be a process or spot color, or even a tint, mixed ink, or gradient.

                                 

                                Document Inks are just that: the actual inks needed to print the document. Only swatches that you defined as "Spot Color" will appear (well, those and the predefined four). There is no need (or so I think , as I understand the issue at hand) to try and find swatches that correspond to these inks.

                                 

                                This one-line Javascript will show inks:

                                 

                                alert (app.activeDocument.inks.everyItem().name.join("\r"));

                                 

                                If you didn't add any spot colors, you will see just Cyan, Magenta, Yellow, and Black. Otherwise, it will show the entire list as can also be seen in Separation Preview. (Notice that this will include all imported spot colors, not just "used ones".)

                                 

                                To dynamically build a checkbox dialog, you could use something like this (warning: quick, ugly, probably needs work, but it does the basic job):

                                 

                                inklist = app.activeDocument.inks.everyItem().name;
                                checklist = [];
                                
                                var inkDialog = app.dialogs.add({name:"Inks", canCancel:true});
                                with (inkDialog)
                                {
                                  with(dialogColumns.add())
                                  {
                                    for (i=0; i<inklist.length; i++)
                                    {
                                      with(dialogRows.add())
                                        checklist.push (checkboxControls.add({staticLabel:inklist[i], checkedState:false}));
                                    }
                                  }
                                }
                                
                                1 person found this helpful
                                • 15. Re: Printing only certain colors to Postscript [JS, CS3]
                                  [Jongware] Most Valuable Participant

                                  Hm. This list does not include "Registration", but if you used this 'color' as you should, the dialog shouldn't need to show it either.

                                  • 16. Re: Printing only certain colors to Postscript [JS, CS3]
                                    [Jongware] Most Valuable Participant

                                    Since the list of inks also shows unused swatches, you could put this piece of code at the top:

                                     

                                    i = app.activeDocument.unusedSwatches.length-1;
                                    while (i >= 0)
                                    {
                                      try {
                                        app.activeDocument.unusedSwatches[i].remove();
                                      } catch (_) { }
                                      i--;
                                    }
                                    

                                     

                                    If you don't mind loosing all of your custom (unused) swatches, that is. If you do, you might want to build a list of inks and then (probably) check each one if it occurs in the unusedSwatches list. If it does, don't include it in the checkbox list. ... Come to think of that, you also might want to set that ink to "printInk = false" (for separation output only) -- I'm not sure, but ID CS3 might be dumb enough to include a separation for it even if you didn't use it.

                                    • 17. Re: Printing only certain colors to Postscript [JS, CS3]
                                      Muppet Mark Level 5

                                      Jong see my post above about 'Registration'… No such colour, no such plate… no need to list it…

                                      • 18. Re: Printing only certain colors to Postscript [JS, CS3]
                                        NateO12 Level 1

                                        So if I'm understanding this correctly, since cyan, magenta and yellow show up in the separations output area, they will always be included in any kind of array/list involving inks? That's probably not an issue for me. There is even the off chance that a file will come through with one of those colors, so I wouldn't want to exclude them. I'm going to play around with Jong's latest bit of code and see what I can do with it. It's been a while since I've had to do any coding like this so I'm sure I'll be back in a while.

                                         

                                        Speaking of which, how are the 'Correct Answer' and 'Helpful Answer' buttons supposed to work? Who gets to decide what answer is correct/helpful?

                                         

                                        Thanks for the help so far everyone.

                                        • 19. Re: Printing only certain colors to Postscript [JS, CS3]
                                          [Jongware] Most Valuable Participant

                                          I don't ever use "Registration" ... except for items that do need to show up on all plates (Seriously though: for custom color plate names, cut lines -- that kind of stuff.)

                                           

                                          There has been some discussions about whether or not it was wise of Adobe to include it in the standard list of swatches, and thus make it very easy for newbees to mis-use. Perhaps they should make a standard pop-up "Are you sure you want to use this non-color?" every time someone selects it.

                                          • 20. Re: Printing only certain colors to Postscript [JS, CS3]
                                            Muppet Mark Level 5

                                            They could always preflight the doc… Registration is one of the colour options if your lines are out side bleed bounds they won't register an error only when used inside… n yup had users colour up with this by mistake… The black display options don't always cut it…

                                            • 21. Re: Printing only certain colors to Postscript [JS, CS3]
                                              NateO12 Level 1

                                              I'm having a little trouble getting the checkedState of the check boxes/inks. I can hard code it, but that obviously isn't going to work.

                                               

                                              var checkColor1 = checklist[0].checkedState;
                                              var checkColor2 = checklist[1].checkedState;
                                              var checkColor3 = checklist[2].checkedState;
                                              var checkColor4 = checklist[3].checkedState;
                                              var checkColor5 = checklist[4].checkedState;
                                              var checkColor6 = checklist[5].checkedState;
                                              var checkColor7 = checklist[6].checkedState;
                                              

                                               

                                              If I do it this way, it properly reports back which colors have been checked. This is not dynamic though. What I'm not understanding is how to cycle through the different check boxes (via the array), and also how to make checkColor a dynamic variable as well. I'm guessing it must involve another for loop, but the variables I've been trying to use give me errors. Any ideas?

                                               

                                              Nate

                                              • 22. Re: Printing only certain colors to Postscript [JS, CS3]
                                                NateO12 Level 1

                                                I've been doing some more work on this, and I'm wondering if a function wouldn't work better for this. I'd still have to get the checkedState and store that value somewhere so I can decide whether to print that ink or not, but might a function work better than a for loop?

                                                • 23. Re: Printing only certain colors to Postscript [JS, CS3]
                                                  NateO12 Level 1

                                                  I decided to take a step back on this and see if I could simply output certain colors via hard coding. I tried using the printInk property, but must not be using it correctly cause all the inks still print to Postscript. Any hints on how to properly use the printInk property? Thanks.

                                                   

                                                  Nate

                                                  • 24. Re: Printing only certain colors to Postscript [JS, CS3]
                                                    NateO12 Level 1

                                                    Made a little progress. I am able to pick and choose, via coding, which colors to print to Postscript. Here's the code I'm using. Eventually this would get rolled into the checkbox/GUI code.

                                                     

                                                    var myDocument  = app.activeDocument;
                                                    var inklist = app.activeDocument.inks.everyItem().name;
                                                    
                                                    mydpp = myDocument.printPreferences;
                                                    myDocument.printPreferences.printer = Printer.POSTSCRIPT_FILE;
                                                    colorOutput = ColorOutputModes.separations;
                                                    trapping = Trapping.off;
                                                    f = new File("//172.25.77.225/spool/"+ myDocument.name +".ps");
                                                    
                                                    myDocument.inks[3].printInk = false;  //black
                                                    myDocument.inks[4].printInk = true;  //blue
                                                    myDocument.inks[5].printInk = false;  //red
                                                    myDocument.inks[6].printInk = true;  //green
                                                    
                                                    mydpp.printFile = f;
                                                    myDocument.print(false, undefined);
                                                    
                                                    app.activeDocument.save();
                                                    

                                                     

                                                    Now, the one thing that isn't working correctly is black. It seems I have no control over when it prints or not. If I use a print preset that has black selected, then I get black no matter what. I can't override the preset. However, if I choose a preset that does not have black selected, I still can't tell black to print. Is that normal? I don't think it'll be an issue, cause if the document doesn't have black on it, it won't print anyway. I just thought it was odd that I couldn't control it.

                                                     

                                                    Oh and I'm sure my code is lacking in many ways, so any tips or hints are always appreciated.

                                                    • 25. Re: Printing only certain colors to Postscript [JS, CS3]
                                                      NateO12 Level 1

                                                      Big progress!!

                                                       

                                                      //The print preset you use needs to be set to separations, NOT in-rip separations
                                                      
                                                      var myDocument = app.activeDocument;
                                                      
                                                      v = app.activeDocument.unusedSwatches.length-1;
                                                      while (v >= 0)
                                                      {
                                                        try {
                                                          app.activeDocument.unusedSwatches[v].remove();
                                                        } catch (_) { }
                                                        v--;
                                                      }
                                                      
                                                      inklist = app.activeDocument.inks.everyItem().name;
                                                      checklist = [];
                                                      
                                                      //creates dialog box
                                                      var inkDialog = app.dialogs.add({name:"What inks do you want to output?", canCancel:true});
                                                      with (inkDialog)
                                                      {
                                                          with(dialogColumns.add())
                                                        {
                                                          for (i=0; i<inklist.length; i++)
                                                          {
                                                            with(dialogRows.add())
                                                            //.push adds items to an array
                                                              checklist.push(checkboxControls.add({staticLabel:inklist[i], checkedState:false}));
                                                          }
                                                        }
                                                      }
                                                      //Display the dialog box
                                                      var myDialog = inkDialog.show();
                                                      if(myDialog == true)
                                                      {
                                                      
                                                          for (m=0; m<checklist.length; m++)
                                                          {
                                                              if(checklist[m].checkedState == true)
                                                              {
                                                                  myDocument.inks[m].printInk = true;
                                                              }
                                                              else
                                                              {
                                                                  myDocument.inks[m].printInk = false;
                                                              }
                                                          }
                                                      
                                                      inkDialog.destroy();
                                                      }
                                                      
                                                      else
                                                          {
                                                              inkDialog.destroy();
                                                          }
                                                      
                                                      mydpp = myDocument.printPreferences;
                                                      mydpp.activePrinterPreset = "Print Preset 1";
                                                      myDocument.printPreferences.printer = Printer.POSTSCRIPT_FILE;
                                                      colorOutput = ColorOutputModes.separations;
                                                      trapping = Trapping.off;
                                                      printBlack = true;
                                                      f = new File("//172.25.77.225/spool/"+ myDocument.name +".ps");
                                                      mydpp.printFile = f;
                                                      myDocument.print(false, undefined);
                                                      myDocument.save();
                                                      myDocument.close();
                                                      

                                                       

                                                      This script will pop up a dialog with the document inks, and then let you choose which ones to print. However, there is still the issue of Process Black. It seems to have a mind of its own. To reiterate from an earlier post of mine, if the print preset written in the script has black set to output, and black is used on the document, you can't shut it off by checking the box on the dialog. You'll get the black sep everytime. If the print preset used does not have black selected, then even if you check the box on the dialog you won't get black to output.

                                                       

                                                      Is this problem with black due to it being a process color? Is there any way around this? This script is almost perfect except for this issue.

                                                      • 26. Re: Printing only certain colors to Postscript [JS, CS3]
                                                        NateO12 Level 1
                                                        myPrinterPreset = "Preset1";
                                                        with(app.activeDocument.printPreferences)
                                                        {
                                                         printer = Printer.POSTSCRIPT_FILE;
                                                         ppd = "PlateStream";
                                                         colorOutput = ColorOutputModes.SEPARATIONS;
                                                         trapping = Trapping.OFF;
                                                         printFile = "c:/test/test.ps";
                                                         myPrinterPreset.printBlack = false;
                                                         myPrinterPreset.printCyan = false;
                                                         myPrinterPreset.printMagenta = false;
                                                         myPrinterPreset.printYellow = false;
                                                         }
                                                        app.activeDocument.print(false, undefined);
                                                        

                                                         

                                                        it still always ouputs the black. What am I missing here?

                                                        • 27. Re: Printing only certain colors to Postscript [JS, CS3]
                                                          NateO12 Level 1

                                                          Well I believe I have this working now. Here's the code:

                                                           

                                                          // This script works by doing a few things. First, it will delete any ink that isn't actually on the document and in use.
                                                          // Then it will prompt the user to choose what inks they want to output. Once the script has those ink choices,
                                                          // it will decide, via four if statements, what colors to output. There are four if statements to handle all the combinations
                                                          // of cyan and black outputs. The other colors checked (red, blue, etc.) will be printed from within all the ifs.
                                                          // Once it knows what colors to output it creates a preset based on those criteria, and then uses that preset to
                                                          // output the file. After the file is printed to Postscript it deletes the preset and saves and closes the file.
                                                          // If the preset doesn't get deleted for some reason, it will simply be overwritten the next time the script runs.
                                                          // I figured it would be cleaner if it would delete it each time.
                                                          
                                                          if (app.documents.length == 0)
                                                          {
                                                          alert("No document is open.")
                                                          exit();
                                                          }
                                                          
                                                          var myDocument = app.activeDocument;
                                                          
                                                          v =myDocument.unusedSwatches.length-1;
                                                          while (v >= 0)
                                                          {
                                                            try {
                                                             myDocument.unusedSwatches[v].remove();
                                                            } catch (_) { }
                                                            v--;
                                                          }
                                                          
                                                          inklist = myDocument.inks.everyItem().name;
                                                          checklist = [];
                                                          
                                                          //creates dialog box
                                                          var inkDialog = app.dialogs.add({name:"F4 2up LH", canCancel:true});
                                                          
                                                          with (inkDialog.dialogColumns.add())
                                                          {
                                                                  with(dialogRows.add())
                                                                  {
                                                                      var choiceText = staticTexts.add({staticLabel:"Choose ink(s) to output:"});    
                                                                  }
                                                                  with(dialogRows.add())
                                                                  {
                                                                      with(dialogColumns.add())
                                                                      {
                                                                          for (i=0; i<inklist.length; i++)
                                                                          {
                                                                          with(dialogRows.add())
                                                                          //.push adds items to an array
                                                                          checklist.push(checkboxControls.add({staticLabel:inklist[i], checkedState:false}));
                                                                          }
                                                                      }
                                                                  }
                                                          }
                                                          
                                                          //Display the dialog box
                                                          var myDialog = inkDialog.show();
                                                          if(myDialog == true)
                                                          {
                                                          
                                                              for (m=0; m<checklist.length; m++)
                                                              {
                                                                  if(checklist[m].checkedState == true)
                                                                  {
                                                                      myDocument.inks[m].printInk = true;
                                                                  }
                                                                  else
                                                                  {
                                                                      myDocument.inks[m].printInk = false;
                                                                  }
                                                              }
                                                          }
                                                          else
                                                          {
                                                              inkDialog.destroy();
                                                              exit();
                                                          }
                                                          
                                                          //--------------------------------------------------------------------------------------------------------
                                                          
                                                          //check to see if cyan is checked and black is not
                                                          if((checklist[0].checkedState == true) && (checklist[3].checkedState == false))
                                                          {
                                                              var myPreset = app.printerPresets.item("tempPreset");
                                                          
                                                          try
                                                          {
                                                              myPreset.name;
                                                          }
                                                          
                                                          catch(myError)
                                                          {
                                                              myPreset = app.printerPresets.add({name:"tempPreset"});
                                                          }
                                                          
                                                          with(app.activeDocument.printPreferences)
                                                          {
                                                              pageRange = PageRange.allPages;
                                                              myPreset.useDocumentBleedToPrint = useDocumentBleedToPrint;
                                                              myPreset.printer = Printer.POSTSCRIPT_FILE;
                                                              myPreset.ppd = "PlateStream";
                                                              myPreset.colorOutput = ColorOutputModes.SEPARATIONS;    
                                                              myPreset.paperSize = PaperSizes.custom;    
                                                              myPreset.pagePosition = PagePositions.UPPER_LEFT;
                                                              //myPreset.screening = ("110 lpi / 1200 dpi");
                                                              myPreset.cyanFrequency = 110;    
                                                              myPreset.cyanAngle = 15;
                                                              myPreset.printCyan = true;
                                                              myPreset.magentaFrequency = 70;
                                                              myPreset.magentaAngle = 15;    
                                                              myPreset.printMagenta = false;
                                                              myPreset.yellowFrequency = 70;    
                                                              myPreset.yellowAngle = 0;
                                                              myPreset.printYellow = false;
                                                              myPreset.blackFrequency = 70;    
                                                              myPreset.blackAngle = 45;
                                                              myPreset.printBlack = false;
                                                          }
                                                              mydpp = myDocument.printPreferences;
                                                              mydpp.activePrinterPreset = "tempPreset";
                                                              f = new File("//172.25.77.225/spool/"+ myDocument.name +".ps");
                                                              mydpp.printFile = f;
                                                              myDocument.print(false, undefined);
                                                              myPreset.remove();
                                                              myDocument.save();
                                                              myDocument.close();
                                                          }
                                                          //--------------------------------------------------------------------------------------------------------
                                                          //--------------------------------------------------------------------------------------------------------
                                                          
                                                          //check to see if cyan is unchecked, but black is checked
                                                          if((checklist[0].checkedState == false) && (checklist[3].checkedState == true))
                                                          {
                                                              var myPreset = app.printerPresets.item("tempPreset");
                                                          
                                                          try
                                                          {
                                                              myPreset.name;
                                                          }
                                                          
                                                          catch(myError)
                                                          {
                                                              myPreset = app.printerPresets.add({name:"tempPreset"});
                                                          }
                                                          
                                                          with(app.activeDocument.printPreferences)
                                                          {
                                                              pageRange = PageRange.allPages;
                                                              myPreset.useDocumentBleedToPrint = useDocumentBleedToPrint;
                                                              myPreset.printer = Printer.POSTSCRIPT_FILE;
                                                              myPreset.ppd = "PlateStream";
                                                              myPreset.colorOutput = ColorOutputModes.SEPARATIONS;
                                                              myPreset.paperSize = PaperSizes.custom;
                                                              myPreset.pagePosition = PagePositions.UPPER_LEFT;
                                                              //myPreset.screening = ("110 lpi / 1200 dpi");
                                                              myPreset.cyanFrequency = 110;
                                                              myPreset.cyanAngle = 15;
                                                              myPreset.printCyan = false;
                                                              myPreset.magentaFrequency = 70;
                                                              myPreset.magentaAngle = 15;
                                                              myPreset.printMagenta = false;
                                                              myPreset.yellowFrequency = 70;    
                                                              myPreset.yellowAngle = 0;
                                                              myPreset.printYellow = false;
                                                              myPreset.blackFrequency = 70;    
                                                              myPreset.blackAngle = 45;
                                                              myPreset.printBlack = true;
                                                          }
                                                              mydpp = myDocument.printPreferences;
                                                              mydpp.activePrinterPreset = "tempPreset";
                                                              f = new File("//172.25.77.225/spool/"+ myDocument.name +".ps");
                                                              mydpp.printFile = f;
                                                              myDocument.print(false, undefined);
                                                              myPreset.remove();
                                                              myDocument.save();
                                                              myDocument.close();
                                                          }
                                                          //--------------------------------------------------------------------------------------------------------
                                                          //--------------------------------------------------------------------------------------------------------
                                                          
                                                          //check to see if black AND cyan are checked
                                                          if((checklist[3].checkedState == true) && (checklist[0].checkedState == true))
                                                          {
                                                              var myPreset = app.printerPresets.item("tempPreset");
                                                          
                                                          try
                                                          {
                                                              myPreset.name;
                                                          }
                                                          
                                                          catch(myError)
                                                          {
                                                              myPreset = app.printerPresets.add({name:"tempPreset"});
                                                          }
                                                          
                                                          with(app.activeDocument.printPreferences)
                                                          {
                                                              pageRange = PageRange.allPages;
                                                              myPreset.useDocumentBleedToPrint = useDocumentBleedToPrint;
                                                              myPreset.printer = Printer.POSTSCRIPT_FILE;
                                                              myPreset.ppd = "PlateStream";
                                                              myPreset.colorOutput = ColorOutputModes.SEPARATIONS;
                                                              myPreset.paperSize = PaperSizes.custom;    
                                                              myPreset.pagePosition = PagePositions.UPPER_LEFT;
                                                              //myPreset.screening = ("110 lpi / 1200 dpi");
                                                              myPreset.cyanFrequency = 110;
                                                              myPreset.cyanAngle = 15;
                                                              myPreset.printCyan = true;
                                                              myPreset.magentaFrequency = 70;
                                                              myPreset.magentaAngle = 15;    
                                                              myPreset.printMagenta = false;
                                                              myPreset.yellowFrequency = 70;    
                                                              myPreset.yellowAngle = 0;
                                                              myPreset.printYellow = false;
                                                              myPreset.blackFrequency = 70;    
                                                              myPreset.blackAngle = 45;
                                                              myPreset.printBlack = true;
                                                          }
                                                              mydpp = myDocument.printPreferences;
                                                              mydpp.activePrinterPreset = "tempPreset";
                                                              f = new File("//172.25.77.225/spool/"+ myDocument.name +".ps");
                                                              mydpp.printFile = f;
                                                              myDocument.print(false, undefined);
                                                              myPreset.remove();
                                                              myDocument.save();
                                                              myDocument.close();
                                                          }
                                                          
                                                          //--------------------------------------------------------------------------------------------------------
                                                          //--------------------------------------------------------------------------------------------------------
                                                          
                                                          //otherwise, neither cyan nor black are checked
                                                          else
                                                          {
                                                              if((checklist[3].checkedState == false) && (checklist[0].checkedState == false))
                                                              {
                                                                  var myPreset = app.printerPresets.item("tempPreset");
                                                          
                                                          try
                                                          {
                                                              myPreset.name;
                                                          }
                                                          
                                                          catch(myError)
                                                          {
                                                              myPreset = app.printerPresets.add({name:"tempPreset"});
                                                          }
                                                          
                                                          with(app.activeDocument.printPreferences)
                                                          {
                                                              pageRange = PageRange.allPages;
                                                              myPreset.useDocumentBleedToPrint = useDocumentBleedToPrint;
                                                              myPreset.printer = Printer.POSTSCRIPT_FILE;
                                                              myPreset.ppd = "PlateStream";
                                                              myPreset.colorOutput = ColorOutputModes.SEPARATIONS;
                                                              myPreset.paperSize = PaperSizes.custom;    
                                                              myPreset.pagePosition = PagePositions.UPPER_LEFT;
                                                              //myPreset.screening = ("110 lpi / 1200 dpi");
                                                              myPreset.cyanFrequency = 110;
                                                              myPreset.cyanAngle = 15;    
                                                              myPreset.printCyan = false;
                                                              myPreset.magentaFrequency = 70;
                                                              myPreset.magentaAngle = 15;
                                                              myPreset.printMagenta = false;
                                                              myPreset.yellowFrequency = 70;    
                                                              myPreset.yellowAngle = 0;
                                                              myPreset.printYellow = false;
                                                              myPreset.blackFrequency = 70;    
                                                              myPreset.blackAngle = 45;
                                                              myPreset.printBlack = false;
                                                          }
                                                              mydpp = myDocument.printPreferences;
                                                              mydpp.activePrinterPreset = "tempPreset";
                                                              f = new File("//172.25.77.225/spool/"+ myDocument.name +".ps");
                                                              mydpp.printFile = f;
                                                              myDocument.print(false, undefined);
                                                              myPreset.remove();
                                                              myDocument.save();
                                                              myDocument.close();
                                                              }
                                                          }
                                                          
                                                          inkDialog.destroy();
                                                          

                                                           

                                                          So far it's been working quite nicely. Thanks for all the help everyone. If there is anything that looks like it should be changed please let me know. It's been a while since I did anything like this.

                                                           

                                                          Nate