home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 1: Collection A / 17Bit_Collection_A.iso / files / 1153.dms / 1153.adf / autoexec.Bak / autoexec.amosSourceCode
AMOS Source Code  |  1978-01-17  |  6KB  |  238 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. Paper 6
  79. Pen 12
  80. On Error Proc HELP2
  81. Locate 0,3 : Print "The bar menu only works when the words  `Press a key to start' are on the screen"
  82. Print ""
  83. Print "Press a key to start writing an address"
  84. Wait Key 
  85. Locate 0,3 : Print "                                                                                                                                                                                                                                "
  86. Locate 0,3 : Input "Addressee's Initials: ";I$; : If I$="" Then Goto TYPE
  87. Open Out 1,I$+".add"
  88. Print ""
  89. Locate 0,3 : Print "                                      "
  90. Locate 0,4 : Input "Name: ";A$
  91. Print #1,A$
  92. Locate 0,5 : Input "Street: ";B$
  93. Print #1,B$
  94. Locate 0,6 : Input "Town: ";C$
  95. Print #1,C$
  96. Locate 0,7 : Input "County: ";D$
  97. Print #1,D$
  98. Locate 0,8 : Input "Post Code: ";E$
  99. Print #1,E$
  100. Locate 0,9 : Input "Telephone Number: ";F$
  101. Print #1,F$
  102. Close 1
  103. Goto TYPE
  104. NEW:
  105. Load Iff "demo_disk:pic",0
  106. Paper 6
  107. Pen 12
  108. On Menu On 
  109. I$=""
  110. A$=""
  111. B$=""
  112. C$=""
  113. D$=""
  114. E$=""
  115. F$=""
  116. Print ""
  117. Print ""
  118. Print "Press a Key to load an address to read"
  119. Wait Key 
  120. On Error Proc HELP2
  121. Locate 0,2 : Print "                                            "
  122. Locate 0,3 : Input "Addressee's Initials: ";I$ : If I$="" Then Goto NEW
  123. Open In 1,I$+".add"
  124. Input #1,A$
  125. Input #1,B$
  126. Input #1,C$
  127. Input #1,D$
  128. Input #1,E$
  129. Input #1,F$
  130. Print ""
  131. Locate 0,4 : Print "Name: ";A$
  132. Locate 0,5 : Print "Street: ";B$
  133. Locate 0,6 : Print "Town: ";C$
  134. Locate 0,7 : Print "County: ";D$
  135. Locate 0,8 : Print "Post Code: ";E$
  136. Locate 0,9 : Print "Telephone Number:";F$
  137. Close 1
  138. Print ""
  139. Print "Press a key to load another address"
  140. Wait Key 
  141. Goto NEW
  142. PRT:
  143. Load Iff "demo_disk:pic",0
  144. On Menu On 
  145. Paper 6
  146. Pen 12
  147. I$=""
  148. A$=""
  149. B$=""
  150. C$=""
  151. D$=""
  152. E$=""
  153. Print ""
  154. Print ""
  155. Print "Press a key to load and print an address"
  156. Wait Key 
  157. Locate 0,2 : Print "                                                       "
  158. On Error Proc HELP2
  159. Locate 0,2 : Input "Addressee's Initials: ";I$ : If I$="" Then Goto PRT
  160. Open In 1,I$+".add"
  161. Input #1,A$
  162. Input #1,B$
  163. Input #1,C$
  164. Input #1,D$
  165. Input #1,E$
  166. Locate 0,4 : Print "Name: ";A$
  167. Locate 0,5 : Print "Street: ";B$
  168. Locate 0,6 : Print "Town: ";C$
  169. Locate 0,7 : Print "County: ";D$
  170. Locate 0,8 : Print "Post Code: ";E$
  171. Locate 0,10 : Input "       Are you sure you want to                print this Address? (Y/N)  ";R$
  172. R$=Lower$(R$) : If R$="n" Then Goto PRT
  173. Locate 0,14 : Print "   Please Place Paper in the Printer!"
  174. Lprint A$
  175. Lprint B$
  176. Lprint C$
  177. Lprint D$
  178. Lprint E$
  179. Close 1
  180. Print ""
  181. Print "     Press a key to load and print                   another address "
  182. Wait Key 
  183. Goto PRT : 
  184. DISK:
  185. Load Iff "demo_disk:pic",0
  186. On Menu On 
  187. Paper 6
  188. Pen 12
  189. F$=""
  190. Locate 0,3 : Print "Press a key to load a directory of all      address files, their length                   and all `drawers'                          on the disk"
  191. Wait Key 
  192. Locate 0,3 : Print "                                                                                                                                                 "
  193. F$=Dir First$("*.add")
  194. While F$<>""
  195. Print F$-".add" : Bell : Wait 30
  196. F$=Dir Next$
  197. Wend 
  198. Print "Press a key to load directory again"
  199. Wait Key 
  200. Goto DISK
  201. DELETE:
  202. Load Iff "demo_disk:pic",0
  203. On Menu On 
  204. Paper 6
  205. Pen 12
  206. K$=""
  207. R$=""
  208. Locate 0,3 : Print "Press a key to delete an address"
  209. Wait Key 
  210. Locate 0,3 : Print "                                "
  211. Locate 0,3 : Input "     Addressee's initials for                address to be deleted : ";K$ : If K$="" Then Goto DELETE
  212. Print ""
  213. Input "    Are sure you want to delete               this person's address? ";R$
  214. R$=Lower$(R$) : If R$="n" Then Goto DELETE
  215. On Error Proc HELP2
  216. Kill K$+".add"
  217. Locate 0,10 : Print "Deleting ";K$
  218. Wait 100
  219. Goto DELETE
  220. Procedure HELP
  221. Locate 0,3 : Print "You have not copied the file `PASS'  to this disk!"
  222. Print "This program will not work without this  file!!!"
  223. Wait Key 
  224. Edit 
  225. Resume Next 
  226. End Proc
  227. Procedure HELP2
  228. Resume Next 
  229. End Proc
  230. Procedure HELP3
  231. Screen Open 0,320,200,16,Lowres
  232. Locate 0,4 : Print "You have not copied the file `PIC'  to this disk!"
  233. Print "This program will not work without this  file!!!"
  234. Print "Press a Key to exit"
  235. Wait Key 
  236. Edit 
  237. Resume Next 
  238. End Proc