home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
251-275
/
apd257
/
journal.amos
/
journal.amosSourceCode
Wrap
AMOS Source Code
|
1991-07-03
|
5KB
|
208 lines
Break Off
On Error Proc HELP3 : Load Iff "pic",0
Paper 6
Pen 12
PASSWORD:
On Error Proc HELP
Open In 1,"pass"
Input #1,P$
Close 1
Locate 10,12 : Input "Enter the Password : ";PASS$
If PASS$=P$ Then Goto SUB1
If PASS$<>P$ Then Goto SUB2
SUB1:
Locate 5,5 : Print "*** CORRECT PASSWORD GIVEN ***"
Print ""
Print ""
Locate 5,5 : Print " "
Locate 10,12 : Print " "
Locate 0,8 : Input " Do you want to change the password ? (Y/N) ";Q$
Q$=Lower$(Q$) : If Q$="n" Then Goto JOURNAL
If Q$="y" Then Goto CHANGE
CHANGE:
Open Out 1,"pass"
Locate 0,8 : Print " "
Input "What would you like to change the password to? ";P$ : If P$="" Then Goto CHANGE
Print #1,P$
Close 1
Goto JOURNAL
SUB2:
Bell : Wait 40
Print ""
Print " *** FAILED ENTRY ***"
Boom : Wait 40
Goto SUB2
JOURNAL:
On Menu On
Menu$(1)=" Options "
Menu$(1,1)="Read a File"
Menu$(1,2)="Write a File"
Menu$(1,3)="Print a File"
Menu$(1,4)="Disk Directory"
Menu$(1,5)="Delete a File"
Menu$(2)="Credits "
Menu$(2,1)="Programmed By"
Menu$(2,1,1)="Ben Mitchell"
Menu$(2,3)="Using"
Menu$(2,3,1)="AMOS "
Menu$(2,1,2)="4,St Clair Close"
Menu$(2,1,3)="Reigate"
Menu$(2,1,4)="Surrey"
Menu$(2,2)="Password By "
Menu$(2,2,1)="Dean Hartwell "
Menu On
On Menu Proc ACTION
Procedure ACTION
If Choice(2)=1
Goto NEW
End If
If Choice(2)=2
Goto TYPE
End If
If Choice(2)=3
Goto PRT
End If
If Choice(2)=4
Goto DISK
End If
If Choice(2)=5
Goto DELETE
End If
End Proc
TYPE:
Load Iff "pic",0
On Menu On
I$=""
A$=""
B$=""
Paper 6
Pen 12
On Error Proc HELP2
Locate 0,3 : Print "The bar menu only works when the words `Press a key to start' are on the screen"
Print ""
Print "Press a key to start writing a file"
Wait Key
Locate 0,3 : Print " "
Locate 0,3 : Input "Name to save file as? ";I$; : If I$="" Then Goto TYPE
Open Out 1,I$+".jrn"
Print ""
Locate 0,3 : Print " "
Locate 0,3 : Input " ";A$
Print #1,A$
Locate 0,16 : Input "";B$
Print #1,B$
Close 1
Goto TYPE
NEW:
Load Iff "pic",0
Paper 6
Pen 12
On Menu On
I$=""
A$=""
B$=""
Print ""
Print ""
Print "Press a Key to load a file to read"
Wait Key
On Error Proc HELP2
Locate 0,2 : Print " "
Locate 0,3 : Input "File to Load? ";I$ : If I$="" Then Goto NEW
Open In 1,I$+".jrn"
Input #1,A$
Input #1,B$
Print ""
Locate 0,3 : Print " "
Locate 0,3 : Print "";A$
Locate 0,16 : Print "";B$
Close 1
Print ""
Print "Press a key to load another file"
Wait Key
Goto NEW
PRT:
Load Iff "pic",0
On Menu On
Paper 6
Pen 12
I$=""
A$=""
B$=""
R$=""
Print ""
Print ""
Print "Press a key to load and print a file"
Wait Key
Locate 0,2 : Print " "
On Error Proc HELP2
Locate 0,2 : Input "File to Print? ";I$ : If I$="" Then Goto PRT
Open In 1,I$+".jrn"
Input #1,A$
Input #1,B$
Locate 0,3 : Print " "
Locate 0,4 : Print "Please place paper in the printer!"
Locate 0,3 : Print "" : Print "";A$
Locate 0,16 : Print "";B$
Input " Are you sure you want to print this file? (Y/N) ";R$
R$=Lower$(R$) : If R$="n" Then Goto PRT
Lprint A$
Lprint B$
Close 1
Print "Press a key to load and print a new file"
Wait Key
Goto PRT :
DISK:
Load Iff "pic",0
On Menu On
Paper 6
Pen 12
F$=""
Locate 0,3 : Print "Press a key to load a directory of all journal files, their length and all `drawers' on the disk"
Wait Key
Locate 0,3 : Print " "
On Error Proc HELP2
F$=Dir First$("*.jrn")
While F$<>""
Print F$-".jrn" : Bell : Wait 30
F$=Dir Next$
Wend
Print ""
Print "Press a key to load directory again"
Wait Key
Goto DISK
DELETE:
Load Iff "pic",0
On Menu On
Paper 6
Pen 12
K$=""
R$=""
Locate 0,3 : Print "Press a key to delete an address"
Wait Key
Locate 0,3 : Print " "
Locate 0,3 : Input "File to be deleted : ";K$ : If K$="" Then Goto DELETE
R$=Lower$(R$) : If R$="n" Then Goto DELETE
On Error Proc HELP2
Kill K$+".jrn"
Locate 0,10 : Print "Deleting ";K$
Wait 100
Goto DELETE
Procedure HELP
Locate 0,3 : Print "You have not copied the file `PASS' to this disk!"
Print "This program will not work without this file!!!"
Wait Key
Edit
Resume Next
End Proc
Procedure HELP2
Resume Next
End Proc
Procedure HELP3
Screen Open 0,320,200,16,Lowres
Locate 0,4 : Print "You have not copied the file `PIC' to this disk!"
Print "This program will not work without this file!!!"
Print "Press a Key to exit"
Wait Key
Edit
Resume Next
End Proc