Re: Printer commands



Liz,

I tried using the code you suggested (and filled in all the other numbers in
the string) and I read the Help file, but it doesn't do anything. In Help I
see how to open a text file and write to it, but I don't see anything
referencing opening a printer port by naming the port (it doesn't say it
won't, either). I have checked to ensure that the printer is really
attached to LPT1, and that it receives other commands (like printing a
report). The Help file says writeString sends characters to a text file,
but I'm presuming that if LPT1 is opened by the ts.open() event, then it
should be writing the string to the port. I tried it with writeLine also,
with the same result.

Is there something I can send to the printer in the same way which will
print out (rather than open the cash drawer) so that I can see if anything
actually gets to the printer? Or am I missing the whole thing somehow?

Phil

"Liz McGuire" <liz@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:4313D089.6ED98503@xxxxxxxxxxxxxxxxxxxxxxx
> Phil,
>
> Open a textStream variable on the LPT port and "writeString()" the
> commands:
>
> ts.open("LPT1","nw")
> ts.writeString(chr(27),chr(112)...)
>
> See TextStream in ObjectPAL help for details on how to use it.
>
> Liz
>
>
> MouseHart wrote:
>>
>> I have a sort of an odd problem. I wrote a small POS system in Paradox
>> 10
>> for an Episcopal church store (much like the Salvation Army), and all it
>> needs to do after a sale (or after "No Sale" is entered") is print a
>> receipt
>> and open a cash drawer. I bought both the cash drawer and the receipt
>> printer from POSGuys.com, and the brand name on them is POSx. The
>> printer
>> is a parallel port printer which emulates an Epson TM-U200 receipt
>> printer,
>> and the cash drawer plugs into it. When the proper command is sent to
>> the
>> printer, it prints a receipt and opens the cash drawer. I called the
>> manufacturer and tested that it worked by following their instructions
>> which
>> were: open Wordpad, find a font named "control" (they said sometimes you
>> have to open Wordpad twice to be able to see this font; go figure), type
>> the
>> letter "A", and send it to the printer. That successfully opens the cash
>> drawer. I have no clue why this works and neither did the tech.
>>
>> They also gave me two code strings of numeric commands either one of
>> which,
>> when sent to the printer, is supposed to open the cash drawer. They said
>> to
>> insert one of them after all the other printer commands (like the report
>> print command, I presume). The code strings are 27,112,48,25,250 or
>> 27,112,0,25,250. I have absolutely no idea what to do with them or where
>> to
>> put them in order to get the drawer to open, and neither does the
>> manufacturer (they've never dealt with Paradox). I can get the register
>> tape to print just fine by sending a Paradox report to it, but can't
>> open
>> the drawer. My only other choice is to never give the customer any
>> change,
>> but that sounds harsh.
>>
>> I'd appreciate any help I can get. Thanks.
>>
>> Phil Benson
>> CrossFire Software, Inc.


.



Relevant Pages

  • Re: Calling an application Help file from VBA???
    ... ByVal FileName As String) ... > 'Opens the Help container. ... > 'Opens the Help file to ContextID as a pop-up window. ...
    (microsoft.public.access.modulesdaovba)
  • Re: finding how much the file system is full, from a C program?
    ... If string is a null pointer, the system function determines whether the host ... The fopen function opens the file whose name is the string pointed to by filename, and associates a stream with it. ... wb truncate to zero length or create binary file for writing ...
    (comp.lang.c)
  • Re: Command button to open form and find record
    ... Opens the form if it is not already open. ... Public Function OpenFormTo(strForm As String, strWhere As String, Optional bGotoNewRecord As Boolean, _ ... Optional strOpenArgs As String) As Boolean ... Public Function HasProperty ...
    (microsoft.public.access.forms)
  • OpenForm error: Access 2007/2010
    ... Running into a strange problem where a command button suddenly stops ... "StartStopDates_TransferOpenFirst" normally opens. ... Dim ServerMoorefield As String ...
    (comp.databases.ms-access)
  • Re: Passing Form input to stored procedure to populate a report
    ... opens the form or report and pass them to an array vaiable, ... Public astrParamsAs String ... Dim stDocName As String ... The form/report opens ...
    (microsoft.public.access.adp.sqlserver)