home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / pascal / 7714 < prev    next >
Encoding:
Text File  |  1992-12-29  |  1.8 KB  |  45 lines

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