If you use a LaserWriter, you can print in the background with the help of AppleΓÇÖs PrintMonitor. If you use a different kind of printer, there are ΓÇ£spoolerΓÇ¥ programs you can buy from several companies. A spooler intercepts the information before it is printed, returns control of the application to you, and then sits in the background feeding the information to the printer.
If you donΓÇÖt have a spooler, the next best thing is for the application to keep feeding information to the printer, but allow you to switch to another application (under MultiFinder) and work there. If you leave it in the foreground, other applications ought to be able to run in the background. That is the ideal of how the MacintoshΓÇÖs cooperative multitasking operating system should work, and it is not difficult for the programmer to accomplish, but unfortunately most donΓÇÖt do it. Perhaps theyΓÇÖre worried that you will do something silly like try to print from another application before the first print job is finished.
Without getting too technical, there are basically three ways that an application can fail to support multitasking during printing:
1. It can fail to yield any processing time to other applications while it is printing.
2. It can tell the operating system that it doesn't want to run in the background at all.
3. It can put up a modal dialog while printing, preventing you from switching it to the background.
I wrote the PrintAid control panel extension (INIT/cdev) to alleviate these problems. In its most basic mode of operation, it handles just problem (1) by installing a routine which is called periodically during printing, and which allows you either to switch the printing application into the background or to run something else in its background. Depending on the control panel settings, PrintAid can also handle problems (2) and (3). As usual, you can cancel printing (when the printing application is in the foreground) by pressing command-period. Let me emphasize that PrintAid is NOT A SPOOLER. Whereas a spooler lets you do anything while printing proceeds in the background, PrintAid lets you do anything EXCEPT work in the application that is doing the printing.
The original plans for System 7 included a new printing architecture, which was to allow background printing for every printer. That was dropped under time pressure, but presumably Apple will get around to it sooner or later, and then PrintAid will become obsolete.
Using PrintAid
To use PrintAid, put it into your System Folder (or, in System 7, your Control Panels folder) and restart your Mac. You can use PrintAidΓÇÖs control panel interface to turn PrintAid off, turn off its startup icon, or read this help text. You can also specify how you want to be notified when a printing job finishes in the background: by an alert box, by a beep, or not at all. Try it first with the default settings.
If all goes well, you can start a printing job, then switch to another application by clicking on a window belonging to another application or by using the application icon in the menu bar. (In System 6, you click on the icon, while in System 7 you pull down a menu.) As mentioned below, this may not work immediately.
System 6.0.4 or later is required.
Configuring PrintAid
Let’s use MacWrite II as an example. MacWrite II, like many applications, displays a modal dialog when it is printing. Since this normally prevents you from switching out, you need to configure PrintAid so that it will hide the dialog when you try to switch to another application. You could make this part of the default setting, but the more conservative approach is to create a custom setting for MacWrite II. Open up the PrintAid control panel. Pull down the pop-up menu of settings, and select “Add Application…”. You will see a standard Open dialog, which you should use to select MacWrite II. This creates a new setting, which is initially the same as the default setting. Click the “Hide Modal Dialog” checkbox. Now close the control panel, go back to MacWrite II, and try printing again. You should succeed in switching to another application this time, and MacWrite should continue to print.
Now letΓÇÖs consider another example, TeachText. When you print with TeachText, there is no modal dialog, so after a short delay you should be able to switch to another application. However, as soon as you do reach another application, you will hear a beep and see an alert saying:
PrintAid Warning: This application cannot
function in the background. Use the ΓÇ£Force
Background OperationΓÇ¥ setting in the PrintAid
control panel.
Obviously, the solution is to create a new setting for TeachText, with ΓÇ£Force Background OperationΓÇ¥ turned on.
Yet another situation occurs in Amazing Paint. The story begins like that of MacWrite II: There is a modal dialog, so you create a custom setting with ΓÇ£Hide Modal DialogΓÇ¥ checked. However, when you try it, you get an alert saying:
Sorry, this application uses its own event
handler during printing, so PrintAid will not
be able to hide a modal dialog or alert you when
printing is done.
In this situation, you must either give up on printing Amazing Paint files in the background, or resort to ResEdit. If you open Amazing Paint with ResEdit, you can find a DLOG resource named ΓÇ£Print InfoΓÇ¥. Open it up and select ΓÇ£Set 'DLOG' CharacteristicsΓÇ¥ from the DLOG menu. Change the ProcID from 1 to 9, close, and save changes. Oh, and while youΓÇÖre poking around in there, you might as well go into the SIZE resource, ID = 0, and turn on the ΓÇ£Can BackgroundΓÇ¥ bit. That will make it unnessary to use ΓÇ£Force Background OperationΓÇ¥ in PrintAid. Standard ResEdit disclaimer: DonΓÇÖt do this to your only copy of any application.
Under System 7, you can create a custom setting for a desk accessory by selecting ΓÇ£Add Active ProcessΓÇ¥ while the DA is running.
Limitations and Imperfections
ΓÇó You still may not get instant response to your attempt to switch to a different application during printing. Have you noticed that printing (other than draft mode) happens in two stages? First the application works for a while without printing, and then the printer starts up. It is in this second stage, with the printer actually printing, that PrintAid goes into action.
ΓÇó If the application is REALLY unfriendly to MultiFinder, then PrintAid may not be able to tell that it has been put in the background.
ΓÇó There are likely to be some esthetic flaws, due to the fact that PrintAid cannot process update events and activate events. (Update events are what cause windows to be redrawn when parts that were covered become exposed; activate events control things like highlighting of scroll bars and whether or not the text insertion point is visible.) When windows need to be updated, PrintAid simply causes all of the applicationΓÇÖs windows to be completely redrawn at the end of the print job.
ΓÇó In WriteNow 2.0, the completion alert appears at the end of the first page rather than at the end of the document. This is because WriteNow prints each page as if it were a separate document, a technique which Apple has recommended against (Tech Note 125.)
Feedback Addresses
America Online: JWWalker
CompuServe: 76367,2271
InterNet: 76367.2271@compuserve.com
U.S. Mail: 
James W. Walker
Department of Mathematics
University of South Carolina
Columbia, SC 29208
Distribution Policy
PrintAid is provided free of charge to all Macintosh users. It may be distributed freely, provided that both the software and this documentation are always distributed together, in whole and unchanged. PrintAid may not be sold or offered for sale, or included with another software product offered for sale, except with the express written permission of the author. Companies that distribute public domain/freeware/shareware software for profit are expressly prohibited from distributing PrintAid. This restriction does not apply to bulletin boards, commercial on-line services such as America Online, CompuServe and GEnie, and non-profit Macintosh user groups which hold regularly scheduled public meetings.
Acknowledgements
I would like to thank the people who served as beta testers for PrintAid 1.0: Brian Hall, Seth Laforge, David Lamkins, Jim Lloyd, Brian Lowry, Robert L Mathews, and Chris Morrison.