Skip to content

Instantly share code, notes, and snippets.

@notverypc
Created October 2, 2013 08:41
Show Gist options
  • Save notverypc/6790783 to your computer and use it in GitHub Desktop.
Save notverypc/6790783 to your computer and use it in GitHub Desktop.
Cancel/Delete all print jobs. This is an AppleScript App that can delete all print jobs. Useful for network account etc.. Save as a "Run-Only" app to hide the password
display dialog "Are you sure you want to cancel ALL of the print jobs in the print queue?" buttons {"Yes", "No"} default button 2 with title "Cancel Print Jobs" with icon alias ((path to startup disk) & ¬
"Library:Scripts:NCS:PrinterScripts:PrintFaxPref.icns" as string)
if button returned of result = "Yes" then
set AdminUser to "YOUR ADMIN ACCOUNT"
set AdminPass to "ADMIN PASSWORD"
do shell script "cancel -a -" user name AdminUser password AdminPass with administrator privileges
display dialog "All jobs have been cancelled" buttons ["OK"] default button 1 with title "Cancel Print Jobs" with icon alias ((path to startup disk) & ¬
"Library:Scripts:NCS:PrinterScripts:PrintFaxPref.icns" as string)
end if
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment