Alaska Software Inc. - Open drawer
Username: Password:
AuthorTopic: Open drawer
Andrea SousaOpen drawer
on Mon, 26 Dec 2022 02:12:11 +0000
Hello

Does anyone know how to open drawer on a POS printer using the windows 
driver?
I used to use the ESC commands when the printer used the parallel port, 
but can´d do that with a USB cable.

I tryed, for example this old ESC command for EPSON Printer

	ll=chr(27)+chr(112)+chr(0)+chr(50)+chr(50)
	ll=ll+chr(7)
nTarget := fopen(printer_name, FO_READWRITE)
FWrite(nTarget,ll,len(ll))
fclose(nTarget)




Thanks
Andrea
Jorge L BorlandoRe: Open drawer
on Thu, 29 Dec 2022 19:26:35 -0300
hi Andrea,
you can print via xbppinter() and the Gra() functions
or using _SET_PRINTER instead fopen()

then
      Set( _SET_PRINTFILE, printer_name )
      Set( _SET_PRINTER, .T. )
      Set( _SET_DEVICE, 'PRINTER' )

? chr(27)+chr(112)+chr(0)+chr(50)+chr(50)+'blabalabal'

or

@ x,y say chr(27)+chr(112)+chr(0)+chr(50)+chr(50)+'blabalabal'

      Set( _SET_PRINTER, .f. )
      Set( _SET_DEVICE, 'SCREEN' )
      Set( _SET_PRINTFILE, 'LPT1' )


best regards

"Andrea Sousa" escribió en el mensaje de 
noticias:945c1f2$4fc5e3e8$f1dd7@news.alaska-software.com...

Hello

Does anyone know how to open drawer on a POS printer using the windows
driver?
I used to use the ESC commands when the printer used the parallel port,
but can´d do that with a USB cable.

I tryed, for example this old ESC command for EPSON Printer

ll=chr(27)+chr(112)+chr(0)+chr(50)+chr(50)
ll=ll+chr(7)
nTarget := fopen(printer_name, FO_READWRITE)
FWrite(nTarget,ll,len(ll))
fclose(nTarget)




Thanks
Andrea