print without choosing printer

Paul Kocsis pkocsis at cox.net
Thu Jan 27 21:10:00 EST 2005


My app relies on pseudo-threading schemes, and thus, doing anything that
makes the engine stop and wait will not work for this app as it must
continue to process many ongoing events.

I can't print (on XP) without the printer being chosen via the printer
dialog (either using answer printer or utilizing revShowPrintDialog).  The
problem is that while the XP printer dialog box is up, the engine is
froze...waiting for that dialog box to be dismissed...and thus all my
ongoing realtime processing comes to a halt. 

I have written an external to get the device name for the default printer,
which is what (I'm thinking) answer printer is essentially doing.

Does anybody know how I can hand a printer device name to RR so as to bypass
the need for the use of XP's printer dialog? (It seems that the use of XP's
printer dialog is the only way in which RR can get the device printer name).

Another solution is to not use RR's printing functions (like revPrintField)
and just open the device as a file, write to it, and close it (this *does*
work)...except that using that method I can't find a generic way to set the
text font and size and don't want to use specific printer codes to do it
(don't know *what* printer customer's will have).  revPrintField magically
sets the text font and size....and if I can figure out how to do the same
with "write", then this method would be a solution to my problem.

Thank you all...

Paul Kocsis



More information about the Use-livecode mailing list