[comp.windows.ms] How to tell Print Manager to print a file

dhf@linus.mitre.org (David H. Friedman) (11/01/90)

.  Is there any way to queue a file to Print Manager directly, without
going through a Windows application?
   I'm using Command Post 7.0J as my shell, in place of Program Manager
and File Manager, and generally I'm pleased with it. The most powerful
feature is the menu language, which allows the user to program custom menus.
One choice in the standard File menu is Print (i.e., choose the file in
the directory window, then choose Print), but it turns out to simply copy
the file to LPTx or whatever you specify. While it's printing, the system
is frozen with the hourglass icon replacing the mouse cursar. Queuing to
PrintMan would allow overlapped processing, give the option of flushing
the job or changing the priority, etc. But opening Write or Notepad just
to bring in the file and print it seems like too much wasted motion.
   One possibility I thought of is to open a DOS window and use PRINT.
This could be done in CmdPost by copying the pathname of the file to a
variable (call it  s ) and executing the menu-language statement -
        run("COMMAND.COM","/C DOSPRINT.BAT " s)   ; I think this is right
- where  DOSPRINT.BAT initializes the printer, does a PRINT %1, and EXITs.
The window should close (maybe not 'til the PRINT finishes), or it might
ask for a ^C when you're done with it. Or one could just keep a DOS window
running for PRINT and other such needs. But it seems to defeat the purpose
of Windows to have to keep a trapdoor into DOS available.

dhf@linus.mitre.org
(David H. Friedman, The MITRE Corporation, Bedford, MA 01730)