home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.pascal
- Path: sparky!uunet!gatech!rpi!pribik
- From: pribik@aix.rpi.edu (Kristen Anne Pribis)
- Subject: BP7 and Turbovision Questions
- Message-ID: <5212rn-@rpi.edu>
- Nntp-Posting-Host: aix.rpi.edu
- Organization: Rensselaer Polytechnic Institute, Troy NY
- Date: Tue, 29 Dec 1992 15:47:20 GMT
- Lines: 34
-
- The last time I programmed in Pascal I used TP 4.0. I recently
- received BP 7.0 and am absolutely amazed at its capabilities.
- I am slowly working my way through Turbo Vision, and have a
- question. I would like a data entry window to be opened as
- soon as the program starts, asking for the user to swipe a
- credit card through a card reader (simulates keyboard input).
- If the card is swiped through (the string ends with '?'), I
- want to run a routine without the user having to hit enter or
- any key. If the user presses F3, instead of swiping the card,
- I would like to run another routine for manual entry.
-
- 1) Where should I place the first window procedure? In the
- Application Init constructor? Or can I simulate an event and
- pass the simulated event (such as cmOpenInitWindow or
- something) to the HandleEvent procedure?
-
- 2) How can I scan a data entry field for a '?' and then end data
- entry once it receives the '?'?
-
- 3) If I'm scanning for a '?', can I still capture an F3 to run a
- different routing?
-
- The following is an example of a credit card swipe, but imagine
- it all on a single line:
-
- %B5123456789012345^SMITH/JOE^951110112102OP/0000000000000000?
-
- The ^9511 is the expiration date - 11/95. The first string of
- numbers is the credit card number.
-
- Any sample code would be greatly appreciated.
- Replies can be posted here, but preferably mailed to me at
- pribik@rpi.edu. Thanks in advance, and to all of those who
- helped me with my async communications questions.
-