4

I'm considering purchasing a scanner such as the Esky™ Automatic USB (Bi-directional) Barcode Scanner.

I've produced some QR codes (containing valid http URLs) which I'd like students at my school to scan.

I'd like to use the machine as a terminal - students scan the URL and then are unable to do anything else (no keyboard or mouse, for instance).

As such, is it possible to set this barcode scanner (or any others) to automatically open my browser if the QR Code being scanned has a URL format?

In addition, would it then be possible to have non-URL QR content to be entered into the browser's active form field? I.e. if the QR code said 12345, it would just enter it into the active text box on the current webpage (if a webpage was open already)?

5
  • Are you on Windows ?
    – harrymc
    Feb 26, 2013 at 20:10
  • @harrymc yes, but I could set up a linux box just as easily.
    – turbonerd
    Feb 26, 2013 at 22:08
  • @dunc From what I see, the scanner you mention is 1D scanner, can it read QR codes? I don't think so. Also, feature you request (being able to click an URL decoded) is the work for an application, not the scanner itself. There are few Windows QR Barcode Reader Apps available for free, if you just enter that in google (just checked). They MAY have such a click-to-run function. My app on a smartphone also has. I wrote something like this for Win, in C++, but it reads only code128, so can't help.
    – Kitet
    Feb 28, 2013 at 17:40
  • I looked into some projects based on a :CueCat scanner many years ago. There was information on how to grab the data using a simple script, but the main thing was that they seemed to act like a keyboard. It essentially typed the numbers and sent an enter when it was done. Maybe something like that would work well for your project?
    – Melikoth
    Mar 1, 2013 at 15:23
  • what did you ended up using with? I am trying to do the same. Mar 9, 2016 at 12:14

4 Answers 4

5
+50

Don't buy that particular scanner-- it doesn't support 2D barcodes.

Does the computer you plan to use for this have a webcam? Because that might be a totally acceptable scanner for this purpose. Then you could use software such as http://blog.odoa.eu/post/QR-Code-Scanner-for-Desktop-and-Laptop.aspx to do what you want. (I tested this. It's clearly a weekend project, but contrary to what the blog post says, it does work for me in Windows 7).

Here's another one, which I haven't tested, which looks like it might do exactly what you want (using a webcam): http://www.funcode-tech.com/Download_en.html

One concern I have is how to bring the QR application back to the foreground after viewing the web page if you don't have a keyboard or mouse. If it was me, I'd probably tinker with AutoHotKey as a way of doing this, but there are probably other ways to go.

If a webcam isn't an option, then you need to buy a 2D scanner (usually more expensive than a webcam!) And the issue of how to get to the web page becomes a little bit more complicated. That said, I think it might be possible to build the whole thing in AutoHotKey if you're using a 2D scanner.

1
  • Let me know which direction you plan to go on this-- I'm happy to fiddle with things further and even provide a sample AutoHotKey script if it is helpful.
    – davidcl
    Mar 1, 2013 at 23:57
4

You will need someone (or yourself) to develop a software for this purpose.

Basically you will need to capture the barcode input, use ShellExecute API to launch the web browser, and use the SendMessage API to send the text into the browser form field.

For help on programming you may try stackoverflow.com :)

2
  • Thanks for that Owen. Are you aware of any existing programs which might be able to do that for me? I'm an experienced web developer but no experience with shell-based languages at all.
    – turbonerd
    Feb 25, 2013 at 11:52
  • This should have been the accepted answer.
    – FabricioG
    Oct 8, 2020 at 16:46
1

For anyone still looking to do this, it is now possible to scan a QR code from inside a webpage, using the device's camera (browser permission requested): https://github.com/schmich/instascan

That should, incidentally, help with the app switching problem, as now the scanner is a part of the page.

0

For the auto-population of a form field, if you control the Web server, you could add a parameter(s) to the URL that will be used to populate the required form-field(s).

Apart from this, why not use a smartphone to read the URL, rather than a computer?

A smartphone will surely have a QR-code reading app that can read an URL and browse it. There will be no security problems then with your PC, but better make sure not to leave any personal data on the smartphone ...

6
  • Hi Harry. Thanks for input. I'm trying to work out whether the barcode scanner will be able to automatically read the web URLs then automatically launch the machine's browser and visit that URL. I can't use a phone as it's for students at a middle school (9-13) and even if we did they wouldn't be on the local network where the scripts are stored.
    – turbonerd
    Feb 25, 2013 at 15:22
  • (Students at a middle school probably have better smartphones than many adults.) If the network is not visible via the Internet, you could use your own smartphone, or a good WiFi router, to give them guest access to the network.
    – harrymc
    Feb 25, 2013 at 15:34
  • They sure do - but they're not allowed to use them in the school. Nor would staff be able to give students their smartphones for any purpose. In addition, I'd prefer it if students couldn't see the URL coming off the QR Codes, which we wouldn't be able to control on a smartphone. Thanks for the input.
    – turbonerd
    Feb 26, 2013 at 17:44
  • I then that suggest you start leaning PowerShell.
    – harrymc
    Mar 1, 2013 at 8:16
  • How does PowerShell help?
    – davidcl
    Mar 1, 2013 at 23:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .