June 21, 201114 yr I have an invoice layout with a couple of fields, Item_Search and Quantity. Most of the time a barcode scanner is used and quantity defaults to 1. Sometimes I'd like to be able to type in an Item ID, tab over to the Quantity field, enter my new quantity (say "5") and hit Return or Enter, THEN trigger my script that adds the item to the invoice. I've toyed around with the OnObjectKeystroke script trigger, but it's too slow. Running a script after each individual keystroke, even if it exits immediately, is too much of a slowdown. After scanning a barcode, I can watch the characters slowly appear in the field (whereas before, they are entered almost instantaneously). Is there a way to detect if the Tab key was used when triggering a script using OnObjectSave? Something like Get(LastKeystroke) would be handy. Thanks,
June 21, 201114 yr I and many others use OnObjectKeystroke in this way. I am using this over a LAN with no observable delay whatsoever. Is your script doing anything other than testing for the keystroke? An after thought. I use a simple script with an if statement to check the keystroke. If the keystroke is "Enter" then this small script calls another script. If not it does nothing. Perhaps if you are testing at the beginning of a large script that may be where the delay is. Just a thought.
June 21, 201114 yr Do you need a trigger on both the bar code field and the quantity? Are you using Get(TriggerKeystroke) in your script? This article may help.
Create an account or sign in to comment