andybiochem Posted October 12, 2008 Posted October 12, 2008 (edited) Hi, Just wondered if anyone had any experience with this... Where I work we use lots of barcodes and hand-held barcode readers. Up till now I have been writing programs to accept data from the scanner by just focusing a standard input box. Continuously polling the input box for data change means you can get the program to 'react' to someone scanning a barcode. Is there any way I can get a direct hook to the USB input device rather than polling an input box? It would be great to not have the program keep re-focusing on the input box just waiting for a scan. I guess it would be something along the lines of _IsPressed which hooks the keyboard. Thanks! Edited October 12, 2008 by andybiochem - Table UDF - create simple data tables - Line Graph UDF GDI+ - quickly create simple line graphs with x and y axes (uses GDI+ with double buffer) - Line Graph UDF - quickly create simple line graphs with x and y axes (uses AI native graphic control) - Barcode Generator Code 128 B C - Create the 1/0 code for barcodes. - WebCam as BarCode Reader - use your webcam to read barcodes - Stereograms!!! - make your own stereograms in AutoIT - Ziggurat Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Box-Muller Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Elastic Radio Buttons - faux-gravity effects in AutoIT (from javascript)- Morse Code Generator - Generate morse code by tapping your spacebar!
andybiochem Posted October 12, 2008 Author Posted October 12, 2008 Never mind, I found out how to do this. Normally I would post my solution to the problem, but it involved hooking the keyboard (the computers recognise a USB barcode reader as a keyboard input apparently), and could easily be converted to a key logger. Sufficient to say the solution is all done within AutoIT, and is all documented in the help file!!!! I've been using AutoIT for about a year now, and I'm always amazed at the breadth and depth of the language. AutoIT is a STUNNING prog. - Table UDF - create simple data tables - Line Graph UDF GDI+ - quickly create simple line graphs with x and y axes (uses GDI+ with double buffer) - Line Graph UDF - quickly create simple line graphs with x and y axes (uses AI native graphic control) - Barcode Generator Code 128 B C - Create the 1/0 code for barcodes. - WebCam as BarCode Reader - use your webcam to read barcodes - Stereograms!!! - make your own stereograms in AutoIT - Ziggurat Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Box-Muller Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Elastic Radio Buttons - faux-gravity effects in AutoIT (from javascript)- Morse Code Generator - Generate morse code by tapping your spacebar!
martin Posted October 12, 2008 Posted October 12, 2008 Never mind, I found out how to do this.Normally I would post my solution to the problem, but it involved hooking the keyboard (the computers recognise a USB barcode reader as a keyboard input apparently), and could easily be converted to a key logger.Sufficient to say the solution is all done within AutoIT, and is all documented in the help file!!!!I've been using AutoIT for about a year now, and I'm always amazed at the breadth and depth of the language. AutoIT is a STUNNING prog. That's useful to know, I wouldn't have expected that. Is that normal for a barcode reader do you think? Presumably there was no special driver needed for the barcode reader or is it the driver that makes it look like a keyboard? Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
ken82m Posted October 12, 2008 Posted October 12, 2008 I setup a few dozen symbol scanners on our warehouse computers.They had loads of options on how to interface them and what to emulate if anything.I set them all up to emulate keyboards because some of the other modes wouldn't work in all applications.-KennyThat's useful to know, I wouldn't have expected that. Is that normal for a barcode reader do you think? Presumably there was no special driver needed for the barcode reader or is it the driver that makes it look like a keyboard? "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains."
martin Posted October 12, 2008 Posted October 12, 2008 I setup a few dozen symbol scanners on our warehouse computers.They had loads of options on how to interface them and what to emulate if anything.I set them all up to emulate keyboards because some of the other modes wouldn't work in all applications.-KennyThanks Kenny. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
fdm99 Posted June 28, 2009 Posted June 28, 2009 Never mind, I found out how to do this.Normally I would post my solution to the problem, but it involved hooking the keyboard (the computers recognise a USB barcode reader as a keyboard input apparently), and could easily be converted to a key logger.Sufficient to say the solution is all done within AutoIT, and is all documented in the help file!!!!I've been using AutoIT for about a year now, and I'm always amazed at the breadth and depth of the language. AutoIT is a STUNNING prog. I am attempting to develop an application to scan barcodes and am running into the same challenges. Any code snippets you could throw my way would be appreciated.
fdm99 Posted July 2, 2009 Posted July 2, 2009 I am attempting to develop an application to scan barcodes and am running into the same challenges. Any code snippets you could throw my way would be appreciated.Don't worry about responding I figured it out myself ... Very helpful group. NOT ...
jchd Posted July 5, 2009 Posted July 5, 2009 Thanks Kenny.If that is of any interest to you, or to someone here, most BC scanners in PC keyboard emulation (driverless) mode will send "compose" sequences.For instance, suppose the BC reader needs to send the digit '8', which is ASCII 0x38 or decimal 56, it would typically send:Alt key downNumeric keypad '0' downNumeric keypad '0' upNumeric keypad '5' downNumeric keypad '5' upNumeric keypad '6' downNumeric keypad '6' upAlt key upThis is the same sequence of keys one would use to _compose_ the digit '8' under Windows. This way, it can send ASCII alpha without worrying about "keyboard" layout and key translation (QWERTY, AZERTY, ...). Unfortunately this also makes it the slowest interface. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now