Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to control programmatically the cash drawer?
Message
From
24/05/2005 00:20:39
 
 
To
21/05/2005 02:44:44
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 2000
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01016436
Message ID:
01016963
Views:
7
Hi Holden

Here's some code I use:



cString = "UUUUU" && set to the string your printer needs eg. CGR(27)+chr(122)+CHR(0)_CHR(187)
cPort ="COM1:"
#Define ForReading 1
#Define ForWriting 2
oWshFile = CREATEOBJECT("Scripting.FileSystemObject")
If TYPE("oWshFile") #"O"
Return .F.
Endif
oCom = oWshFile.OpenTextFile(cport, ForWriting, .T.)
oCom.Write(cString)
oCom.Close
Release oCom
Release oWshFile
Return



>hi to all!
>
>i've been developing a POS System in a small retail store, and my problem is how to control programmatically the cash drawer? What i did for the meantime is to issue the DOS Shell about controlling the COM1. and it was successfully to open the cash drawer. but my second problem is how to detect if the cashier close drawer. What command normally is to use to capture the closing and opening of the cash drawer?.
>
>Thanks.
>
>Holden
Previous
Reply
Map
View

Click here to load this message in the networking platform