08-07-2022, 03:08 PM
Hi Guys,
I figured out a (kludgy) workaround. I implemented it in one of my programs and it seems to work (until it doesn't.)
Before I modify all my other programs, I wanted to get your input on possible pitfalls.
At the beginning of the program I open a file, "printer.prn" for Output as file number ff%.
I changed ALL my Lprints to Print #ff%, (something I tried very hard to avoid.)
Every time I issue a page feed, Print #ff%, chr$(12), I call this sub:
Sub PrintTheFile
printfile$ = "printer.prn"
Close ff%
Shell _Hide "copy " + printfile$ + " prn"
Open "O", ff%, printfile$:
End Sub
I probably could have used PRINT instead of COPY. One of the downsides here is that using SHELL copy (or PRINT) sends it out LPT1 so I have to make sure LPT1 is redirected properly.
I found SUBing after each page feed gave me much more control then waiting until the entire job was in the file.
I close the file and reopen it to make sure what I already sent to the printer does not get reprinted.
Any comments would be appreciated.
A
I figured out a (kludgy) workaround. I implemented it in one of my programs and it seems to work (until it doesn't.)
Before I modify all my other programs, I wanted to get your input on possible pitfalls.
At the beginning of the program I open a file, "printer.prn" for Output as file number ff%.
I changed ALL my Lprints to Print #ff%, (something I tried very hard to avoid.)
Every time I issue a page feed, Print #ff%, chr$(12), I call this sub:
Sub PrintTheFile
printfile$ = "printer.prn"
Close ff%
Shell _Hide "copy " + printfile$ + " prn"
Open "O", ff%, printfile$:
End Sub
I probably could have used PRINT instead of COPY. One of the downsides here is that using SHELL copy (or PRINT) sends it out LPT1 so I have to make sure LPT1 is redirected properly.
I found SUBing after each page feed gave me much more control then waiting until the entire job was in the file.
I close the file and reopen it to make sure what I already sent to the printer does not get reprinted.
Any comments would be appreciated.
A