>Hi All:
>
>I have a form that has a label: 'Please swipe the Credit card or press escape'. It also has an edit box that has focus, so that when the credit card is swiped about 50 characters are entered.
>
>How do I execute a method when either: escape is pressed OR the characters have finished being entered from the swipe?
>
>Thanks,
>
>Yossi
Usually a final character (end sentinel) is passed to let you know that the reader has finished passing data from the last swipe. Check for that ascii value or escape in the keypress or programmatic change event. Is the reader a usb hid device or comm? If comm, read til you receive the expected last char in the oncomm and if hib usb, you'll have to check the keypress or programmatic changed (whichever one the reader fires). The start sentinel is typically a % and the end sentinel is typically a ? but it may differ by company or state.
See:
http://money.howstuffworks.com/personal-finance/debt-management/credit-card2.htmhttp://www.answers.com/topic/magnetic-card
.·*´¨)
.·`TCH
(..·*
010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"