Solution to: Testing for completion of print spooling?

Bruce A. Pokras macstacks at earthlink.net
Sun Nov 19 11:05:04 CST 2006


This is a Mac OS X matter, so Windows users can skip to the next message.

If you are printing several files using separate AppleScript "print" 
commands, you might find that the last page of each file (except for 
the last file) is not printed. I found that this occurred if the next 
print command was sent while the Printer Icon in the Dock was still 
being displayed from the previous print command. So how can you tell 
if the Printer Icon is there or not?

Many thanks to that "Son of Thunder", Ken Ray, for his ProcessList 
function (see 
http://www.sonsofthunder.com/devres/revolution/tips/proc002.htm). 
That will give you a real-time list of running processes. I found 
that the process that represents the Printer Icon in the Dock is 
called "PrinterProxy".  Once I had that figured out, it was easy to 
delay the sending of the next print command until the Printer Icon 
had disappeared from the previous print command.

Bottom line: no more missing pages!

Regards,

Bruce Pokras
Blazing Dawn Software
www.blazingdawn.com



More information about the use-livecode mailing list