5 Replies Latest reply on Sep 19, 2016 6:11 AM by carlsson

    Wait for text input from external card reader

    carlsson

      I'm very tired at the moment and this is probably very easy to solve, but at the moment I need help.

       

      I have a layout where the user is supposed to draw a RFID card over a scanner. I want the numbers from the card to be registered in a global field or variable and then perform a search.

      Simple, right?

       

      However, there are some caveats:

      - The system should detect by itself when there are no more digits coming from the reader.

      - We don't know how many characters that's on the card. It could be all from 7-13.

      - There are no stop character from the reader. They are just plain numbers, eg "7566984401".

      Because of that I am thinking I must give the system one second to wait for more characters, my problem is that I can't get the timer to work. If I trigger it on a keystroke, it would be triggered for every number that's on the card, and it would be a mess. I have experimented with loops etc, but it gets very stupid in the end.

       

      Any ideas or examples maybe?

       

      Please help!

      /andreas

        • 1. Re: Wait for text input from external card reader
          David Moyer

          Hi,

          you can probably program your scanner to insert a special character of your choice at the end of whatever string it reads.  Look for prefix and suffix characters.

          I think that I used to use the Pause script step after entering into (selecting) a global text field.  The scanner was programmed to insert the keypad Enter character (or equivalent) after each scan.  That extra enter/return character Continued the script.

          1 of 1 people found this helpful
          • 2. Re: Wait for text input from external card reader
            philmodjunk

            Does the scanner operate in Keyboard emulation mode?

             

            Can it be configured to put specific characters into the "preamble" and "postamble" of the scanned text?

             

            If so, a character combination in the preamble can trip an OnObjectEnter trigger to put the cursor into a field to receive the rest of the scanned data. A return, tab or enter character at the end can trip the OnObjectExit trigger to perform a script to process the scanned data.

             

            Bar code readers and Mag Stripe readers work in this fashion. I think RFID scanners do as well, but you'll need to research what the scanner can do and how it can be configured in any case.

            1 of 1 people found this helpful
            • 3. Re: Wait for text input from external card reader
              carlsson

              Thanks for the input.

               

              There is no way of altering the input from the reader and the cards are alreay made...

              Hence the thought of a timer.

               

              Breakdown of my process:

              1. Wait for input

              2. When first character is entered, start a timer.

              3. More characters are entered.

              4. When timer reach 1 sec, save record and do other stuff.

               

              Any ideas?

              • 4. Re: Wait for text input from external card reader
                philmodjunk

                That works, but it seems very unlikely that you can't configure the reader as this is a pretty standard feature of such devices. The main problem, possibly minor, is that your system cannot distinguish between input from the reader versus input from other devices such as your keyboard--assuming that it is in keyboard emulation mode in the first place.

                • 5. Re: Wait for text input from external card reader
                  carlsson

                  Just a followup:

                   

                  It turns out that the reader may be programmed to send the end character, and that the supplier must do this.

                   

                  www.pascard.se/USB-Multilasare-Elatech-EM-TWN3-SCTWN3-sv/article

                   

                  Thanks for the help!