Author Topic: BarCode Scanner  (Read 122 times)

jodybingo

  • Hero Member
  • *****
  • Posts: 656
    • View Profile
    • Personal Web Site
BarCode Scanner
« on: July 03, 2017, 11:54:22 AM »
Hi Corey.
I'm not sure where the problem lies so I'm gonna shoot this here. I have programmed a bar code scanner to send a hotkey to open the Add Player Dialog then send the player id. using a spreadsheet this works fine (TAB then the player ID in the next cell). However in TD the Add Player dialog opens up and in nothing appears in the Player Search field. My DB is on a network drive which created a bit of a delay and so I thought the sending of data after the TAB was sent might have caused the data to be lost. However when I tried with only 3 names in my DB on my laptop the results were the same. I don't know if this is a TD problem (it works as wanted in a spreadsheet) or if TD can't consume the data fast enough.

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5402
    • View Profile
Re: BarCode Scanner
« Reply #1 on: July 05, 2017, 02:16:58 PM »
Hard to say since I've done have a scanner and have only done this a few times.  However, most scanners simulate key presses, and key presses should essentially queue up for the application to consume them.  Just trying this manually I can see that several of the first keys I press before the dialog has opened are lost.  For example, I just press Ctrl+A to open the "Add Players" dialog and quickly typed my own name, and only the final "y" showed up in the "Search for" field.

I believe most scanners recognize certain characters to have special meaning, such as a pause.  I would recommend adding a pause between the Ctrl+A (or TAB if that's what you're using) and the text to be searched.  Probably a half second to a second would be all that's needed.

jodybingo

  • Hero Member
  • *****
  • Posts: 656
    • View Profile
    • Personal Web Site
Re: BarCode Scanner
« Reply #2 on: July 05, 2017, 03:53:25 PM »
I'll check to see if I can add a pause between the prefix and the scanned data. Thanks Corey