Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'An AppleScript to quickly stop all print jobs' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
An AppleScript to quickly stop all print jobs
Authored by: vramin on Feb 16, '06 12:04:44PM
I'd consider making this interactive.
display dialog "Are you sure you want to cancel all of the print jobs in the print queue?" buttons ["Yes", "No"] default button 2
if button returned of result = "Yes" then
	do shell script "cancel -a -"
	display dialog "Poof - no more print jobs" buttons ["OK"] default button 1
end if
end


[ Reply to This | # ]
An AppleScript to quickly stop all print jobs
Authored by: vramin on Feb 16, '06 12:43:36PM
oops... The end at the end of the script in the above post is unnecessary.

[ Reply to This | # ]
An AppleScript to quickly stop all print jobs
Authored by: Lizardmap on Feb 16, '06 08:25:36PM

how do i go about making such an interactive command to stop print jobs? I tried using terminal and it wont allow me to make the command interactive



[ Reply to This | # ]
An AppleScript to quickly stop all print jobs
Authored by: pub3abn on Feb 20, '06 06:56:07AM

That was AppleScript code, not a terminal command.



[ Reply to This | # ]
An AppleScript to quickly stop all print jobs
Authored by: RobertBen on Feb 21, '06 02:51:05PM
I really appreciated this AppleScript version, but didn't care for the first dialog (if I launch this script I want to kill all print jobs a.s.a.p.), so I trimmed it a bit which made it look like this:

do shell script "cancel -a -"
display dialog "No more printing jobs" buttons ["OK"] default button 1


Works like a charm and really fast!

P.S. for AppleScript novices:
I also took away the 'Poof', but the displayed dialog can be any text of course.

[ Reply to This | # ]