Subject Re: Outputting to a simple text file
From Michael <michael@itntgroup.com.au>
Date Fri, 20 Jul 2018 19:33:38 -0400
Newsgroups dbase.getting-started

If you are sending to a printer of sorts, then the printer will translate depending on what fonts are available for it.

Therefore, I would make sure you create a generic text printer and set it with _pdriver = "WINSPOOL, Generic/Text".

This will ensure the file gets sent to printer as text form as you print it.

Use Mervyns text to write a text file but if your sending to a printer, use,

_pdriver = "WINSPOOL, Generic/Text"

PRINTJOB
set printer on
? "enter your code"
set printer off
ENDPRINTJOB

This will send the output to the  printer. Same programing structure as Mervyns code.

Note: the output to the printer wont be sent until the ENDPRINTJOB. This will send it to the windows spooler.

Michael.


Matt Milner Wrote:

> In 1988 I wrote an interface to a Unix based Plasma cutting machine to cut out air conditioner ductwork parts usind dBase II.  The code I wrote revolved around "Set Printer on" and sending text lines beginning with ? or ??.  When I use that approach with dBase Plus 11, the text file created contains printer code rather than text.  I have hundreds of pages of ? / ?? code.  Is there a simple switch that will give me a file with just lines of text?