Since you don't have script triggers with 8.5, tab won't do you any good. What you can do is pause a script and have the scanner append the code for the enter key (numeric keypad enter key), to continue the paused script after the data is scanned into a field.
I'd set up a screen with a global field and a button for each of the scanning tasks or a single script that checks the barcode entered and identifies whether the code scanned belongs to a guard or a patron and then performs the appropriate sub script.
Either way you click a button to start a script that uses go to field to put the cursor in the global text field and then pauses. The scanner inputs the scanned text plus the enter key code and this continues the paused script--which then can process the data in the global field as needed.
Phil, I took your advise and used a paused script. It works until I create the actual bar code. I am using 128 and tried appending a vertical tab, horizontal tab, and a carrage return and it partially works until I call in another layout. I tried using the behavior controls and they made things worse as I changed from tab to line to whatever. I have a laser scanner and it is suppossed to read 128. I created the bar codes on P-Touch editor. I'm getting closer. I really appreciate your help. Any suggestions? Tim
I don't understand what this means: " and it partially works until I call in another layout."
Most barcode scanners can be configured to append characters to the beginning and end of the text scanned in from the bar code. You'll need to investigate the techincal info that comes with your scanner to learn how to configure it to do this. The first time I set up a scanner, I had to call their tech support to get the needed technical info, but then it was quite easy to configure. Your mileage may vary...
The key to this trick is that when a script is paused, pressing the enter key is the same as clicking the continue button on the screen. Since scanners work in "keyboard emulation mode", the data input from them is process just as though it came from the keyboard. Thus the character code for the enter key will trigger the paused script to continue.
Ok, I have 3 db files Main, Patrons and Guards (these two only provide the lookup info and are never changed by the script). Main has 4 tables, main, IR report log, Chem log, Guest log. The Script starts to run upon opening the file. If I type the "Number" in, everything functions as I had planned it. If I scan in the bar code, my "If left main:number,1="1" then ... and "2" work But when I use a 3000000 to 5000000 then it reqires the script to go to a different layout and that is where the typing vs scanning diverges. And I can't figure out why. The program that will print the bar codes is suppossed to be able to place a control code at the end of the number. Go figure. Tim
I would put all tables in one file as this makes setting things up a bit simpler.
Yes, but is it correctly appending the correct code? If you are getting a difference in how the script performs when you type in the data instead of scanning it, that's the very first thing to confirm.
Put a second text field on the layout and put both in the tab order. Specify in field behavior that "Enter" moves you to the next field. Put the cursor in the text field, but do not perform the script.
Scan an item.
What happens to the cursor? Does it stay in the same field or do you see the scanned text in the first field and the cursor appears in the second?
If it's successfully appending the enter code to the end of the scanned text, you'll see the cursor move to the next field. If it does not, the cursor will remain in the first field.