[Ilugc] Read Barcode

  • From: arun289@xxxxxxxxx (Arun Venkataswamy)
  • Date: Sat, 19 Feb 2011 16:19:54 +0530

On Sat, Feb 19, 2011 at 12:42 PM, Rajesh kumar <rkrajeshkumar87 at 
gmail.com>wrote:

How can i read a barcode using a C program.

I can able to read barcode manually in a gedit.  i Need to create a c
program which reads the barcode device and write the data to a text file.

How this can be done.


If gedit is getting the bar code data, then most probably it's a keyboard
mimic.
Do you want to write a command line application in C or a GUI based one?

If it is command line based, just use stdin or whatever you use
to normally get keyboard input.

If it's GUI based, either you can wait for keyboard events or the simpler
way is to ask the user to place the cursor in a text field and then scan.
Then collect the information form the text field.

Regards,
Arun

Other related posts: