Jump to content

skennedy

Members
  • Posts

    3
  • Joined

  • Last visited

Reputation

5 Neutral

About skennedy

Personal Information

  • Occupation
    Technician
  • Location
    Norwich
  1. Unfortunately no luck there either. It then comes up with an error when adding the }
  2. var response = actions.client.promptPrintCancel change this to var response = actions.client.promptYesNo Yes we are working on Mac, This unfortunately still brought up a 2nd pop up for me with incorrect pricing again.
  3. I am currently using a script to offer for jobs to be printed in black and white. It displays the cost if printed in colour. My issue is papercut then displays a 2nd pop up if you say "No" (convert to grayscale) but still displays original cost of colour. The print does charge correctly and prints in black and white but the 2nd pop up displays the incorrect cost. /* * Color print jobs require user confirmation * * Color printing is expensive so users should be encouraged to print * in grayscale whenever they print in color. No confirmation is required * for grayscale jobs. */ function printJobHook(inputs, actions) { /* * This print hook will need access to all job details * so return if full job analysis is not yet complete. * The only job details that are available before analysis * are metadata such as username, printer name, and date. * * See reference documentation for full explanation. */ if (!inputs.job.isAnalysisComplete) { // No job details yet so return. return; } // Test if the job is color (contains at least 1 color page) if (inputs.job.isColor) { // Add your action code here var response = actions.client.promptYesNo("This print job is colour" + " and costs " + inputs.utils.formatCost(inputs.job.cost) + ". You can save money by printing the job in grayscale. " + "Are you sure you would like this print job in colour?", {"dialogTitle" : "Colour print job", "dialogDesc" : "Consider printing in grayscale to reduce costs"}); if (response == 'NO') { actions.job.convertToGrayscale(); } else if (response == 'TIMEOUT') { actions.job.cancel(); } else { return; } } } 1st pop up: 2nd pop up:
×
×
  • Create New...