Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Opening Cashdrawer command
Message
From
16/05/2009 20:27:33
 
 
To
16/05/2009 19:22:41
Luis Santos
Biglevel-Soluções Informáticas, Lda
Portugal
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01400258
Message ID:
01400263
Views:
100
>Hello comunity
>
>I need to know how to build a simple PRG to opening my cashdrawer that was connect to my printer Epson Tm-T88II .
>Also, if someone could give me an example using ports COM1 or LPT1.
>The ideia is create a shortcut on windows desktop an clicking on them, the PRG send the correct ASCII code to opening my cashdrawer .
>
>If is only possible on my VFP application calling the PRG or FXP, that´s not represent any problem, because i can use any combination of keyboard , ex : CTRL+F12 to call them.
>
>I search on the WEB but i couldn´t find any example.
>
>Many Thanks
>Luis Santos

Hi Luis,

This works for me. You wouls have to substitute the name of YOUR receipt printer for oAPP.receipt printer. My OS is XP PRO so that may also make a difference>
LOCAL lcOldPrinter

lcOldPrinter=SET('PRINTER',2)

TRY
     SET PRINTER TO NAME (oAPP.receiptprinter)
     SET PRINTER off
     ??? Chr(27)+CHR(112)+chr(0)+chr(64)+chr(240)
     SET PRINTER on
     SET PRINTER OFF
     SET PRINTER TO NAME (lcOLDPrinter)
			
CATCH
FINALLY
ENDTRY	
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform