home *** CD-ROM | disk | FTP | other *** search
/ Phoenix CD 2.0 / Phoenix_CD.cdr / 01e / let12.zip / REGISTER.BAT < prev    next >
DOS Batch File  |  1987-09-17  |  5KB  |  160 lines

  1. echo Off
  2. if not `%Name%' == `' goto Verify
  3. set T=0
  4. :AskName
  5. LET dummy=(do "YourName")
  6. if %T% == 3 goto End
  7. if `%FName%' == `' goto AskName
  8. if `%MayI%' == `Y' LET name=Fname
  9. if not `%MayI%' == `Y' LET name=(words Title Lname)
  10. echo  
  11. :Verify
  12. echo I have your name being %Title% %FName% %LName%.
  13. LET Answer=(upper (mid (ask "Is this correct? (yes or no) ") 1 1))
  14. if `%Answer%' == `Y' goto GotName
  15. if `%Answer%' == `N' goto AskName
  16. goto Verify
  17. :GotName
  18. echo  
  19. echo Thank you, %Name%, for deciding to support this program!  I just
  20. echo need a little more information.
  21. LET ForCompany=(upper (mid (ask "Will this registration of LET be for a company? (yes or no) ") 1 1))
  22. if `%ForCompany%' == `Y' goto RegCo
  23. :RegPers
  24. echo  
  25. LET dummy=(do "RegPers")
  26. echo %Name%, I have the following information:
  27. echo  
  28. echo         %Title% %FName% %LName%
  29. echo         %Street%
  30. echo         %City%, %State%  %Zip%
  31. echo  
  32. :Verify1
  33. LET answer=(upper (mid (ask "Is this correct? (yes or no) ") 1 1))
  34. if `%answer%' == `Y' goto Both
  35. if `%answer%' == `N' goto RegPers
  36. goto Verify1
  37. :RegCo
  38. echo  
  39. LET dummy=(do "RegCo")
  40. echo %Name%, I have the following information:
  41. echo  
  42. echo         %Title% %FName% %LName%
  43. echo         %Position%
  44. echo         %Company%
  45. echo         %Street%
  46. echo         %City%, %State%  %Zip%
  47. echo  
  48. :Verify2
  49. LET answer=(upper (mid (ask "Is this correct? (yes or no) ") 1 1))
  50. if `%answer%' == `Y' goto Both
  51. if `%answer%' == `N' goto RegPers
  52. goto Verify2
  53. :Both
  54. LET dummy=(do "RegBoth")
  55. if %P% == 0 LET Worth=(concat Worth "00")
  56. if not %P% == l Let Worth=(replace Worth "." "")
  57. LET Bill=(+ Worth (* (- Qty 1) 100))
  58. LET BillAmt=(fill "≤≤,≤≤≤.≤≤" bill " $")
  59. LET WorthAmt=(fill "≤≤,≤≤≤.≤≤" Worth " $")
  60. echo Would you be willing, then, to pay %BillAmt%?
  61. echo (that's %WorthAmt% for the first copy, and $1.00 for each additional one.)
  62. LET answer=(upper (mid (ask "Does that sound like a deal? (of course it is!) ") 1 1))
  63. if `%Answer%' == `N' goto Both
  64. echo One Moment...
  65. LET > Let.$$$
  66. LET version=(read "Let.$$$" 0 17)
  67. erase Let.$$$
  68. echo  >Register.Prn
  69. echo  >>Register.Prn
  70. echo  >>Register.Prn
  71. echo  >>Register.Prn
  72. echo  >>Register.Prn
  73. echo               Registration Form for %version% >>Register.Prn
  74. echo -------------------------------------------------------------------->>Register.Prn
  75. echo Registered Owner: %Title% %FName% %LName%>>Register.Prn
  76. echo                   %Position%>>Register.Prn
  77. echo                   %Company%%>>Register.Prn
  78. echo                   %Street%>>Register.Prn
  79. echo                   %City%, %State%  %Zip%>>Register.Prn
  80. echo -------------------------------------------------------------------->>Register.Prn
  81. echo  >>Register.Prn
  82. echo     Qty   Description                                         Price>>Register.Prn
  83. echo    -----  -----------------------------------------------   ------->>Register.Prn
  84. echo      1     Original copy of LET                           %WorthAmt%>>Register.Prn
  85. LET Qty2=(fill "≤≤≤≤" (- Qty 1) " ")
  86. LET WorthAmt=(fill "≤≤,≤≤≤.≤≤" (concat (- Qty 1) "00") " $")
  87. LET check=(mid (- 1 Qty) 1 1)
  88. if `%Check%' == `-' echo   %Qty2%     Additional copies of LET                       %WorthAmt%>>Register.Prn
  89. echo                                                             ------->>Register.Prn
  90. echo                                               Total:      %BillAmt%>>Register.Prn
  91. echo  >>Register.Prn
  92. echo  >>Register.Prn
  93. echo Please Make Checks payable to:>>Register.Prn
  94. echo  >>Register.Prn
  95. echo                    Thomas Tuerke>>Register.Prn
  96. echo                    1004 Hart Court>>Register.Prn
  97. echo                    Novato, CA 94947>>Register.Prn
  98. set fname=
  99. set lname=
  100. set title=
  101. set company=
  102. set position=
  103. set mayI=
  104. set T=
  105. set street=
  106. set city=
  107. set state=
  108. set zip=
  109. set qty=
  110. set p=
  111. set worth=
  112. set bill=
  113. set billamt=
  114. set worthamt=
  115. set qty2=
  116. set check=
  117. echo Please take the time to answer the brief survey:
  118. LET dummy=(do "survey")
  119. echo -------------------------------------------------------------------->>Register.Prn
  120. echo     USERS: %USERS%>>Register.Prn
  121. echo     USE: %USE%>>Register.Prn
  122. echo     BATCH: %BATCH%>>Register.Prn
  123. echo     USER-SCALE: %SCALE%>>Register.Prn
  124. echo     LET-RATING: %RATE%>>Register.Prn
  125. echo     INTEREST: %INTEREST%>>Register.Prn
  126. echo     BEST: %BEST%>>Register.Prn
  127. echo     WORST: %WORST%>>Register.Prn
  128. set users=
  129. set use=
  130. set batch=
  131. set scale=
  132. set rate=
  133. set interest=
  134. set best=
  135. set worst=
  136. echo You may enter any miscellaneous comments on the three lines below:
  137. echo ## ....!....!....!....!....!....!....!....!....!....!....!....!....!....!
  138. LET dummy=(do "comments")
  139. echo -------------------------------------------------------------------->>Register.Prn
  140. echo  %C1%>>Register.Prn
  141. echo  %C2%>>Register.Prn
  142. echo  %C3%>>Register.Prn
  143. echo -------------------------------------------------------------------->>Register.Prn
  144. echo The registration form is now in the file REGISTER.PRN.
  145. set c1=
  146. set c2=
  147. set c3=
  148. echo Thank you, %name%, for your contributions.
  149. echo  
  150. LET answer=(upper (mid (ask "Would you like me to print that (to device PRN)? ") 1 1))
  151. if `%answer%' == `N' goto End
  152. copy Register.Prn Prn
  153. :End
  154. set answer=
  155. set version=
  156. set forcompany=
  157. set ln=
  158. set name=
  159. echo That's All.
  160.