clear print jobs

Iam looking for script that clear the all the print job in the default printer.
I look throughout this forum and on the web but could not find my soln.

help me :cry: :cry: :cry:

I’ve piddled a bit with this and all the commands are there in Print Center’s dictionary, but I’ve found it to be terribly unstable for scripting.

This SHOULD work:

tell application "Print Center"
	delete every job of printer "Brother 1670N"
end tell

BUT, it makes my Print Center quit after the first job is deleted, if at all.
I was, however, successful with other bits, just not anything all that useful:
This did seem to work consistently, though.

tell application "Print Center"
	delete job 1 of printer "Brother 1670N"
end tell

oo. Hold the phone. I just got this to work. I have no explanation as to why it likes this over the way it SHOULD be, but try this. (Inserting your default printer name for mine).

tell application "Print Center"
	set theJobCount to count of every job of printer "Brother 1670N"
	repeat theJobCount times
		delete job 1 of printer "Brother 1670N"
	end repeat
end tell

Good luck. :wink:

thanks you very much
you can’t imagine how good iam feeling know after your reply.
i spent lot of time to do this but i was no where near your suggestions.

thanks once again

It really works for me
but one more problem
the job queue is stopped and to start it i have to go in print center.
is there any additonal code that i can attached to the same script and start the jobs. :lol: :lol: :lol:

There doesn’t seem to be a start/stop command in Print Center’s dictionary.
You’d probably have to employ GUI/System Events scripting to make this part happen.