home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 1: Collection A / 17Bit_Collection_A.iso / files / 1153.dms / 1153.adf / autoexec.AMOS / autoexec.amosSourceCode
AMOS Source Code  |  1978-01-17  |  6KB  |  242 lines

  1. Break Off 
  2. On Error Proc HELP3 : Load Iff "demo_disk:pic",0
  3. Paper 6
  4. Pen 12
  5. PASSWORD:
  6. On Error Proc HELP
  7. Open In 1,"pass"
  8. Input #1,P$
  9. Close 1
  10. Locate 10,12 : Input "Enter the Password : ";PASS$
  11. If PASS$=P$ Then Goto SUB1
  12. If PASS$<>P$ Then Goto SUB2
  13. SUB1:
  14. Locate 5,5 : Print "*** CORRECT PASSWORD GIVEN ***"
  15. Print ""
  16. Print ""
  17. Locate 5,5 : Print "                                "
  18. Locate 10,12 : Print "                                                       "
  19. Locate 0,8 : Input "      Do you want to change                   the password ? (Y/N) ";Q$
  20. Q$=Lower$(Q$) : If Q$="n" Then Goto JOURNAL
  21. If Q$="y" Then Goto CHANGE
  22. CHANGE:
  23. Open Out 1,"pass"
  24. Locate 0,8 : Print "                                                                           "
  25. Input "What would you like to change the           password to? ";P$ : If P$="" Then Goto CHANGE
  26. Print #1,P$
  27. Close 1
  28. Goto JOURNAL
  29. SUB2:
  30. Bell : Wait 40
  31. Print ""
  32. Print "          ***  FAILED  ENTRY  ***"
  33. Boom : Wait 40
  34. Goto SUB2
  35. JOURNAL:
  36. On Menu On 
  37. Menu$(1)=" Options  "
  38. Menu$(1,1)="Read an Address"
  39. Menu$(1,2)="Create New Address"
  40. Menu$(1,3)="Print an Address"
  41. Menu$(1,4)="Disk Directory"
  42. Menu$(1,5)="Delete an Address"
  43. Menu$(2)="Credits  "
  44. Menu$(2,1)="Programmed By"
  45. Menu$(2,1,1)="Ben Mitchell"
  46. Menu$(2,3)="Using"
  47. Menu$(2,3,1)="AMOS "
  48. Menu$(2,1,2)="4,St Clair Close"
  49. Menu$(2,1,3)="Reigate"
  50. Menu$(2,1,4)="Surrey"
  51. Menu$(2,2)="Password By "
  52. Menu$(2,2,1)="Dean Hartwell "
  53. Menu On 
  54. On Menu Proc ACTION
  55. Procedure ACTION
  56. If Choice(2)=1
  57. Goto NEW
  58. End If 
  59. If Choice(2)=2
  60. Goto TYPE
  61. End If 
  62. If Choice(2)=3
  63. Goto PRT
  64. End If 
  65. If Choice(2)=4
  66. Goto DISK
  67. End If 
  68. If Choice(2)=5
  69. Goto DELETE
  70. End If 
  71. End Proc
  72. TYPE:
  73. Load Iff "demo_disk:pic",0
  74. On Menu On 
  75. I$=""
  76. A$=""
  77. B$=""
  78. C$=""
  79. D$=""
  80. E$=""
  81. F$=""
  82. Paper 6
  83. Pen 12
  84. On Error Proc HELP2
  85. Locate 0,3 : Print "The bar menu only works when the words  `Press a key to start' are on the screen"
  86. Print ""
  87. Print "Press a key to start writing an address"
  88. Wait Key 
  89. Locate 0,3 : Print "                                                                                                                                                                                                                                "
  90. Locate 0,3 : Input "Addressee's Initials: ";I$; : If I$="" Then Goto TYPE
  91. Open Out 1,I$+".add"
  92. Print ""
  93. Locate 0,3 : Print "                                      "
  94. Locate 0,4 : Input "Name: ";A$
  95. Print #1,A$
  96. Locate 0,5 : Input "Street: ";B$
  97. Print #1,B$
  98. Locate 0,6 : Input "Town: ";C$
  99. Print #1,C$
  100. Locate 0,7 : Input "County: ";D$
  101. Print #1,D$
  102. Locate 0,8 : Input "Post Code: ";E$
  103. Print #1,E$
  104. Locate 0,9 : Input "Telephone Number: ";F$
  105. Print #1,F$
  106. Close 1
  107. Goto TYPE
  108. NEW:
  109. Load Iff "demo_disk:pic",0
  110. Paper 6
  111. Pen 12
  112. On Menu On 
  113. I$=""
  114. A$=""
  115. B$=""
  116. C$=""
  117. D$=""
  118. E$=""
  119. F$=""
  120. Print ""
  121. Print ""
  122. Print "Press a Key to load an address to read"
  123. Wait Key 
  124. On Error Proc HELP2
  125. Locate 0,2 : Print "                                            "
  126. Locate 0,3 : Input "Addressee's Initials: ";I$ : If I$="" Then Goto NEW
  127. Open In 1,I$+".add"
  128. Input #1,A$
  129. Input #1,B$
  130. Input #1,C$
  131. Input #1,D$
  132. Input #1,E$
  133. Input #1,F$
  134. Print ""
  135. Locate 0,4 : Print "Name: ";A$
  136. Locate 0,5 : Print "Street: ";B$
  137. Locate 0,6 : Print "Town: ";C$
  138. Locate 0,7 : Print "County: ";D$
  139. Locate 0,8 : Print "Post Code: ";E$
  140. Locate 0,9 : Print "Telephone Number:";F$
  141. Close 1
  142. Print ""
  143. Print "Press a key to load another address"
  144. Wait Key 
  145. Goto NEW
  146. PRT:
  147. Load Iff "demo_disk:pic",0
  148. On Menu On 
  149. Paper 6
  150. Pen 12
  151. I$=""
  152. A$=""
  153. B$=""
  154. C$=""
  155. D$=""
  156. E$=""
  157. Print ""
  158. Print ""
  159. Print "Press a key to load and print an address"
  160. Wait Key 
  161. Locate 0,2 : Print "                                                       "
  162. On Error Proc HELP2
  163. Locate 0,2 : Input "Addressee's Initials: ";I$ : If I$="" Then Goto PRT
  164. Open In 1,I$+".add"
  165. Input #1,A$
  166. Input #1,B$
  167. Input #1,C$
  168. Input #1,D$
  169. Input #1,E$
  170. Locate 0,4 : Print "Name: ";A$
  171. Locate 0,5 : Print "Street: ";B$
  172. Locate 0,6 : Print "Town: ";C$
  173. Locate 0,7 : Print "County: ";D$
  174. Locate 0,8 : Print "Post Code: ";E$
  175. Locate 0,10 : Input "       Are you sure you want to                print this Address? (Y/N)  ";R$
  176. R$=Lower$(R$) : If R$="n" Then Goto PRT
  177. Locate 0,14 : Print "   Please Place Paper in the Printer!"
  178. Lprint A$
  179. Lprint B$
  180. Lprint C$
  181. Lprint D$
  182. Lprint E$
  183. Close 1
  184. Print ""
  185. Print "     Press a key to load and print                   another address "
  186. Wait Key 
  187. Goto PRT : 
  188. DISK:
  189. Load Iff "demo_disk:pic",0
  190. On Menu On 
  191. Paper 6
  192. Pen 12
  193. F$=""
  194. Locate 0,3 : Print "Press a key to load a directory of all      address files, their length                   and all `drawers'                          on the disk"
  195. Wait Key 
  196. Locate 0,3 : Print "                                                                                                                                                 "
  197. F$=Dir First$("*.add")
  198. While F$<>""
  199. Print F$-".add" : Bell : Wait 30
  200. F$=Dir Next$
  201. Wend 
  202. Print "Press a key to load directory again"
  203. Wait Key 
  204. Goto DISK
  205. DELETE:
  206. Load Iff "demo_disk:pic",0
  207. On Menu On 
  208. Paper 6
  209. Pen 12
  210. K$=""
  211. R$=""
  212. Locate 0,3 : Print "Press a key to delete an address"
  213. Wait Key 
  214. Locate 0,3 : Print "                                "
  215. Locate 0,3 : Input "     Addressee's initials for                address to be deleted : ";K$ : If K$="" Then Goto DELETE
  216. Print ""
  217. Input "    Are sure you want to delete               this person's address? ";R$
  218. R$=Lower$(R$) : If R$="n" Then Goto DELETE
  219. On Error Proc HELP2
  220. Kill K$+".add"
  221. Locate 0,10 : Print "Deleting ";K$
  222. Wait 100
  223. Goto DELETE
  224. Procedure HELP
  225. Locate 0,3 : Print "You have not copied the file `PASS'  to this disk!"
  226. Print "This program will not work without this  file!!!"
  227. Wait Key 
  228. Edit 
  229. Resume Next 
  230. End Proc
  231. Procedure HELP2
  232. Resume Next 
  233. End Proc
  234. Procedure HELP3
  235. Screen Open 0,320,200,16,Lowres
  236. Locate 0,4 : Print "You have not copied the file `PIC'  to this disk!"
  237. Print "This program will not work without this  file!!!"
  238. Print "Press a Key to exit"
  239. Wait Key 
  240. Edit 
  241. Resume Next 
  242. End Proc