Well, for barcode scanners not held by humans I have always used serial
port scanners in the past. They give you the kind of control you need
for such applications.
As to notepad working: A LabVIEW string control is most probably
working just as well, isn't it? The difference is that the string
control and the notepad application see the key scan codes after it has
been translated into actual characters and placed in the application
message queue by the Windows operating system. The keyboard VIs on the
other hand have to hook into low level system functions to receive the
keys without eating them up and there they are still the scan codes and
as such not necessarily what you will see in the higher level
functions. If the problem is similar to what was happening to the
original poster, the scanner is placing some special scan codes into
the stream for whatever reason. Could be an initialisation sequence
problem of the scanner when the computer starts up and scans for
keyboard devices, or it might just be a buggy scanner.
The keyboard VIs however will likely encounter new problems in the
future with new Windows versions since they interface on such a low
level to the Windows system that any number of small changes to the
working of Windows may result in new behaviour on such a low level. So
relying on those VIs for production type applications is IMO not a good
idea, I wouldn't do it unless I own the C source code of the interface
DLL with which I had done these functions.
Rolf Kalbermatter
Message Edited by rolfk on 07-01-2005 11:04 AM