Microsoft KB Archive/23449

= AppleTalk Printer 60-Second Time-Out Kills Mac BASIC Printing =

Article ID: 23449

Article Last Modified on 8/16/2005

-

APPLIES TO


 * Microsoft BASIC Compiler 6.0b
 * Microsoft BASIC Interpreter 3.0 for Macintosh
 * Microsoft QuickBasic Compiler for Macintosh 1.0

-



This article was previously published under Q23449



SUMMARY
When printing over the AppleTalk Network, the network will time out and nothing will print if a program delays sending output for more than 60 seconds while the printer device ("LPT1:" or "LPT1:PROMPT") is OPEN. This is a problem when the output per page is complicated enough to take more than a minute before the output is sent, or if you attempt to print more than about twenty pages. The problem can occur when printing to either an Apple LaserWriter or ImageWriter over the AppleTalk Network. The problem does not occur with a directly connected LaserWriter or ImageWriter.

This information applies to the Microsoft BASIC Compiler Version 1.00, the Microsoft BASIC Interpreter Version 3.00, and QuickBASIC Version 1.00 for the Apple Macintosh.

As a workaround, you can design your program to prepare and store the printer output before opening the printer. The statements PICTURE ON, PICTURE OFF, and PICTURE$ are useful for storing images in string variables, which can be directed to the printer later with the PICTURE and WINDOW OUTPUT#n statements. Printing can then be performed in one- to ten-page batches so as not to time out.



MORE INFORMATION
The 60-second, automatic time-out is controlled by the interaction between the LaserWriter driver and the AppleTalk Network; BASIC does not have control over it, except as discussed in the above workaround. The purpose of the time-out is to prevent one application from blocking other printer users on the AppleTalk Network.

The following program demonstrates the printer time-out over the AppleTalk Network: OPEN "LPT1:" FOR OUTPUT AS #1 X=TIMER PRINT#1, TIMER  ' Print once. LOCATE 15,1 :  PRINT TIMER LOOP: X=TIMER-X IF X<70 GOTO LOOP ' Then delay 70 seconds before printing again. PRINT #1,TIMER PRINT TIMER CLOSE#1

Additional query words: BasicCom MQuickB

Keywords: KB23449

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.