home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
601-625
/
apd620
/
wswhite
/
examplloader2.amos
/
examplloader2.amosSourceCode
< prev
Wrap
AMOS Source Code
|
1986-08-03
|
3KB
|
126 lines
'**** AMOS_PRO Example loader. 2/12/93 W. S. White
'==============================================
'The AMOS_PRO help routines dont show working examples,
' so I coded this to run "Ronnie Simpsons" examples whilst programing.
'Open a new window.(This lets you Edit selected example)
'Load Exampleloader2 and run.
' Note!!!.. R$ contains the path so alter to suit yours.
'==============================================
Screen Open 1,640,256,4,Hires : Flash Off : Curs Off
Palette $70,$70,$FFF,$FF0
Dim E(84)
Reserve Zone 84
ST=Start(10)
B$="1,2,21,22,41,42,61,62"
Hide
Colour Back $70
Cls
Border 1,2,1
Title Top "....AMOS_PRO Keywords and Example Loader"
Title Bottom "....With AMOS_PRO examples by Ronnie Sinmpson (c) Europress Software"
'=========
XPOS=1 : YPOS=2
For A=0 To 448
Locate XPOS,YPOS
Print Peek$(ST,18)
Add XPOS,20
If XPOS>61 : XPOS=1 : Inc YPOS : End If
If YPOS=27 or A=448
Cmove 0,2
Centre "Press Key or Button to continue"
Repeat : I$=Inkey$ : MK=Mouse Key : Until I$<>"" or MK=1
Cls 1,9,9 To 631,247
XPOS=1 : YPOS=2
End If
Add ST,19
Next
'=========
SELECT_KEYWORDS:
Cls 1,9,9 To 631,247
Show
For A=0 To 84 : E(A)=0 : Next
_KEYLETTERS
ST=Start(10) : XPOS=1 : YPOS=5 : Pen 2
Text 158,33,"Select first letter of AMOS_PRO Keyword"
Repeat
MZ=Mouse Zone
MK=Mouse Key
If Not MZ>=1 and MZ<=27 : Cls 1,550,10 To 580,40 : End If
If MZ>=1 and MZ<=27 : Gosub BIGGER : End If
Until MK=1 and MZ>=1 and MZ<=27
If MZ<=26
I$=Upper$(Chr$(MZ+64))
Else
If MZ=27
I$="="
End If
End If
B=0 : Rem Number of zones/keywords reset to 0 for each screen
For A=0 To 448
G$=Peek$(ST,18)
If Mid$(G$,4,1)=I$
Locate XPOS,YPOS : Print Left$(G$,2); : Pen 3 : Print Mid$(G$,3); : Pen 2
Inc B
Set Zone B,(XPOS*8),(YPOS*8) To(XPOS*8)+24,(YPOS*8)+8
E(B)=Val(Left$(G$,2)) : Rem Store the example No. in E(B)
Add XPOS,20
End If
If XPOS>61 : XPOS=1 : Inc YPOS : End If
Add ST,19 : Rem Advance bank pointer
Next
'===
SELECT_EXAMPLE:
Pen 3
Locate ,27 : Centre "Left Mouse to select/run Example....Right Mouse for new Keyletter"
Locate ,29 : Centre "EXAMPLE No. SELECTED...."
Repeat
MZ=Mouse Zone
MK=Mouse Key
Exit If MK=2
X=X Text(X Screen(X Mouse))
Y=Y Text(Y Screen(Y Mouse))
If X>=1 and X<=2 Then P=8
If X>=21 and X<=22 Then P=168
If X>=41 and X<=42 Then P=328
If X>=61 and X<=62 Then P=488
If MZ>=1 and MZ<=B
A$=Str$(X)-" "
If Instr(B$,A$)
Zoom 1,P,(Y*8),(P+16),(Y*8)+8 To 1,424,224,456,240
Else Cls 1,424,224 To 456,240
End If
Else Cls 1,424,224 To 456,240
End If
Until MK=1 and MZ>=1 and MZ<=B
If MK=2 Then Goto SELECT_KEYWORDS
N$=Str$(E(MZ))-" "
If Len(N$)=1
O$="H-0/Help_"+N$+".Amos"
Else
O$="H-"+Left$(N$,1)+"/Help_"+N$+".Amos"
End If
R$=("DH1:Amos_Pro/Examples/Examples/"+O$) : Rem ENTER YOUR PATH HERE
'===================================================================
Reserve Zone
Cls
Run R$
End
'=============
Procedure _KEYLETTERS
Y=8 : N=65 : A=1
For X=114 To 510 Step 15
Ink 3
Box X,Y To X+12,Y+13
Set Zone A,X,Y To X+12,Y+13
Ink 6
If N=91 Then N=61
Text X+2,Y+10,Chr$(N)
Inc N : Inc A
Next
End Proc
'=======
BIGGER:
Y=8
X=114+(MZ-1)*15
Zoom 1,X,Y,X+15,Y+15 To 1,550,10,580,40
Return