Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...The level of expertise is awesome. The nature in which people respond is professional helpful and not the least condescending. I can't say that for most forums..."

Geography

Where in the world do Tek-Tips members come from?
Mighty (Programmer)
5 Jun 12 8:57
Hi All,

I have a simple script which uses an inputbox to prompt the user for a lot number. The inputbox is populated using a barcode scanner when they scan a barcode on their documentation. What I want to do is prevent them from changing that scanned value or manually entering one.

Can you please advise on how I could do this.

Nick

Mighty

Geates (Programmer)
5 Jun 12 9:25
Not sure. Although, (brainstorm) you could accomplish this if there was a way to append a carriage return to the scanned barcode before it populated the input box. Or, you could disable the keyboard.

-Geates

"I hope I can chill and see the change - stop the bleed inside and feel again. Cut the chain of lies you've been feeding my veins; I've got nothing to say to you!"
-Infected Mushroom

"I do not offer answers, only considerations."
- Geates's Disclaimer

Mighty (Programmer)
5 Jun 12 9:36
Is it easy to disable the keyboard?

Mighty

Geates (Programmer)
5 Jun 12 15:32
Relatively. As the following post suggests, you will need to download and register the AutoIT dll. After that, it's only a couple of lines.
http://www.pcreview.co.uk/forums/disable-enable-keyboard-t531920.html

-Geates

"I hope I can chill and see the change - stop the bleed inside and feel again. Cut the chain of lies you've been feeding my veins; I've got nothing to say to you!"
-Infected Mushroom

"I do not offer answers, only considerations."
- Geates's Disclaimer

frumpus (Programmer)
5 Jun 12 16:37
Assuming that the barcode scanner operates as a 'keyboard emulator' this may have unintended consequences. I went through a similar issue with a card-swipe reader. Appending a carriage return after the read didn't help either as that only works if a read occurs and does not prevent users from typing in the box without using the scanner.

Short answer, if the scanner is indeed a 'keyboard emulator' there is probably no way to do what you want short of physically disconnecting the keyboard and hiding it in the janitor's closet. (Users never look in the janitor's closet.)
frumpus (Programmer)
5 Jun 12 16:38
Oh and by 'unintended consequences' I meant of course that it would disable the scanner as well as the keyboard.
taupirho (Programmer)
6 Jun 12 5:37
Perhaps an easier way would be to use an HTML inputbox, effectively you would be creating a mini HTA application. Worth considering maybe?


In order to understand recursion, you must first understand recursion.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close