Global CURRINDEX$,LASTINDEX$,LOOKLIST$,IN$,BX(),BY(),BXL(),TITLEON,MXCHUNKBUFFER,BUFFERFORZONES,INDEXTEXTBUFFER,INDEXOFFSBUFFER,OFFSET,DFLT,MXZONES,ENTRIES
'
' Hello! Why not save this as "Help.Acc" in your usual directory, so
' when you load AMOS, you could press HELP and have this loaded and run.
'
' Then you can exit with the ESC key and go on and program. Then, when you
' need help on a command, simply put the cursor at the start of that
' command and push help. :]
'
' Or, if you want to read up on a bunch of commands, you can merely run
' this and get all the information you want. :]
'
' Remember, this was NOT meant to substitute the manual, but actually
' substitute the HELP.Acc which did nothing but let you read text files.
'
' Alex... [Warning, DO NOT COMPILE THIS PROGRAM! It won't WORK!]
'
Procedure DISPENTRY[I$]
POS=1 : DISPTITLE[CURRINDEX$]
While POS<Len(I$)
A=Instr(I$,Chr$(1),POS)
If A>0
O$=Mid$(I$,POS,A-POS)
Else
O$=Mid$(I$,POS)
End If
Gosub SETUP : Gosub EOP : POS=POS+Len(O$)+1
If A>0
Gosub WTKEY
If Param>0 or Param<-1
Goto EXT
End If
End If
Wend
I=0
While I=0
MWAIT[0,0,0,0] : I=Param
Wend : Goto EXT
'
SETUP: Clw : Reset Zone : Return
'
WTKEY: P$="Click Left Mouse Button HERE For More." : TXTBOX[P$,40,(Screen Height/8)-1,1,3,1,1] : I=0
While I=0
MWAIT[BX(1),BY(1),BXL(1),1] : I=Param
Wend
MURDERBOX[1] : Return
'
EOP:
O=Len(O$)
While Mid$(O$,O-1,2)=(Chr$(13)+Chr$(10))
O=O-2
Wend
Print Left$(O$,O); : Return
'
EXT: ZIP=Free
End Proc[Param]
Procedure TXTBOX[I$,X,Y,F,B,M,TBOX]
If F=B
B=F-1
If B<0
B=3
End If
End If
If M=1
I$=I$
X=X-((Len(I$)+2)/2)
If X<0
X=0
End If
End If
BX(TBOX)=X : BY(TBOX)=Y : I=(Len(I$)/2)*2+4 : BXL(TBOX)=Len(I$)+2 : Get Bob TBOX,X*8,(Y-1)*8 To(X+I)*8,(Min(Y+1,Screen Height/8))*8
Ink B,B : Bar X*8,Y*8-2 To(X+Len(I$)+2)*8-1,Y*8+7
Ink F,B : Text 8*(X+1),Y*8+Text Base-1,I$
Ink 2,2 : Box X*8,Y*8-2 To(X+Len(I$)+2)*8-1,Y*8+7
End Proc
Procedure MURDERBOX[T]
No Mask T : Paste Bob BX(T)*8,(BY(T)-1)*8,T
End Proc
Procedure MWAIT[X,Y,XL,YL]
OK=0 : While OK=0 : TESTESC : OK=Mouse Click : MX=X Screen(X Mouse)/8 : YY=Y Screen(Y Mouse) : MY=(YY/8) : CY=-(YY>5 and YY<15) : Wend : MZ=Mouse Zone : RT=0
If OK=2
If LOOKLIST$>""
RT=-4
End If
Else
If((MX-X>-1 and MX-X<XL) and(MY-Y>-1 and MY-Y<=YL) and MZ=0)
RT=-1
Else
If MZ>0
RT=MZ
Else
If CY
If(MX>49 and MX<64) or(MX>65 and MX<79)
If MX>64
RT=-3
Else
RT=-2
End If
End If
End If
End If
End If
End If
End Proc[RT]
Procedure TESTESC
I$=Inkey$
If Scancode=69
If DFLT
Default
Else
Screen Close 0
End If
End
End If
End Proc
Procedure INDEXINPUT
TXTBOX["Reading Index. Please Wait...",40,1+Screen Height/16,1,3,1,1] : On Error Goto CRAP
If Length(6)=0
Load "AMOS_Misc:AutoDocs.Abk"
End If
FERGETIT:
Areg(0)=Start(6) : Call Start(9) : Reserve As Work 10,Dreg(1)+16 : INDEXTEXTBUFFER=Start(10) : Reserve As Work 11,Dreg(2)*4+16 : INDEXOFFSBUFFER=Start(11) : Reserve As Work 12,Dreg(3)+16 : BUFFERFORZONES=Start(12) : MXZONES=Dreg(3)+2