On 1/14/07, Peter Alcibiades <[EMAIL PROTECTED]> wrote:
"say, can you tell me which barcode reader you've tried this with?"

Sure, its a Datalogic Gryphon.  Any reader which uses a Y cable to connect
should work however.

The only problem I can see with this method is that you have to ensure that
the window in which your data is going to be entered has focus.  And if the
user does something with the mouse or keyboard, those events will be
registered as well.  So maybe some sort of script is necessary when the Rev
application is opened that somehow locks down the input.  If its for your own
use rather than in a production environment that shouldn't be an issue.

The Gryphon is a nice piece of gear.  You press the trigger.  A light bar
shines out of the scanner end.  You move the light bar to the bar code, it
beeps, a green light appears, and the data appears in the field.   Pretty
robust and available used quite cheaply.


I use various barcode scanners (Datalogic, Unitech, Symbol) and they
all operate in the same manner - as a keyboard wedge. When the barcode
is scanned, the text of the code is sent to the computer exactly as if
the keys were being pressed, so as Peter says, you have to make sure
your application has the focus  - I have had the occasional problem
were the hard drive has been renamed :-)

Apart from that, I use the following scripts:

on keyDown theKey
   if the short name of this Stack = "vicMain" then
       if the hilite of btn "readCodes" of cd 1 then
           put theKey after fld "Barcode"
       else
           pass keyDown
       end if
   else
       pass keyDown
   end if
end keyDown

on rawKeyDown theKey
   if the short name of this Stack = "vicMain" then
       if theKey = 65293 and the hilite of btn "readCodes" of cd 1 then
           autoLog "Scan: " & fld "Barcode"
           put the short name of this card into cardName
           send "processBarcode" to cd cardName
       else
           pass rawKeyDown
       end if
   else
       pass rawKeyDown
   end if
end rawKeyDown


The keyDown script stores any text coming from the barcode scanner.
When the scanner finishes reading a code, it sends a key code of 65293
which is spotted by the rawKeyDown handler, which calls the relevant
script to handle the complete barcode.

I have a stack <http://www.troz.net/Rev/misc/BarcodeTester.rev.gz>
that tests the data coming from a barcode scanner, which you might
find useful.

Cheers,
Sarah
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to