home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sauce 'n' Code 1
/
sauce-n-code-01.adf
/
ASCII_Source
/
InterfacePacker.asc
< prev
next >
Wrap
Text File
|
1995-05-07
|
5KB
|
200 lines
'
' Interface packer v1.0 by Janne Kalliola
'
' This little program shows all the strings of the program, and the user
' may decide should the string be packed as Interface string (remove all
' the unneeded characters), unpacked (add some unneeded characters) or passed
' (a normal string). If the user presses button [Unfold], the accessory
' unfolds all the procedures of the current program.
'
Set Buffer 20
Set Accessory
Dim RIVI$(100,1)
For I=0 To 69
Read RIVI$(I,0)
Read RIVI$(I,1)
Next
Call Editor 11
Call Editor 17
Ask Editor 5
RIVI_MAX=Param
Trap Screen Close 7
Resource Screen Open 7,640,40,0
Cls 0
For I=0 To 6
Trap Screen Hide I
Next
A$="SV 0,'Interface packer';"
A$=A$+"SV 1,'Pack';"
A$=A$+"SV 2,'Unpack';"
A$=A$+"SV 3,'Pass';"
A$=A$+"SV 4,'Unfold';"
A$=A$+"BUtton 1,0,0,24,10,0,0,1;[UNpack 0,0,22 BP+;][NoWait;]"
A$=A$+"BUtton 2,24,0,360,10,0,0,1;[LIne 0,0,41,360;PRint 8,1,0 VA,7;][ScreenMove;]"
A$=A$+"BUtton 3,384,0,64,10,0,0,1;[LIne 0,0,41 BP+ BP+ BP+,64;PR 16,1,1 VA,7;][]"
A$=A$+"BUtton 6,448,0,64,10,0,0,1;[LIne 0,0,41 BP+ BP+ BP+,64;PR 8,1,2 VA,7;][]"
A$=A$+"BUtton 4,512,0,64,10,0,0,1;[LIne 0,0,41 BP+ BP+ BP+,64;PR 16,1,3 VA,7;][]"
A$=A$+"BUtton 5,576,0,64,10,0,0,1;[LIne 0,0,41 BP+ BP+ BP+,64;PR 8,1,4 VA,7;][]"
A$=A$+"LIne 0,36,31,640;"
A$=A$+"EXit;"
Dialog Open 1,A$
D=Dialog Run(1)
Cls 2,0,11 To 640,35
Do
Ask Editor 1
A$=Param$
A=Instr(A$,'"')
If A>0
Cls 2,0,11 To 640,35
Text 0,18,Left$(A$,80)
If Len(A$)>80
Text 0,26,Mid$(A$,81,80)
End If
If Len(A$)>160
Text 0,34,Mid$(A$,161,80)
End If
Do
Exit If Rdialog(1,1)=1,2
If Rdialog(1,3)=1
B$=Mid$(A$,A+1)
C$=Left$(A$,A)
For I=0 To 69
JATKO:
B=Instr(B$,RIVI$(I,0))
If B>0
B$=Left$(B$,B-1)+RIVI$(I,1)+Right$(B$,Len(B$)-B-Len(RIVI$(I,0))+1)
Goto JATKO
End If
Next
Call Editor 71,,C$+B$
X=Free
Dialog Update 1,3,0
Exit
Else If Rdialog(1,4)=1
Dialog Update 1,4,0
Exit
Else If Rdialog(1,5)=1
Call Editor 89
Dialog Update 1,5,0
Else If Rdialog(1,6)=1
B$=Mid$(A$,A+1)
C$=Left$(A$,A)
For I=0 To 69
JATKO2:
B=Instr(B$,RIVI$(I,1)+" ")
If B=0
B=Instr(B$,RIVI$(I,1)+";")
End If
If B=0
B=Instr(B$,RIVI$(I,1)+"+")
End If
If B=0
B=Instr(B$,RIVI$(I,1)+"-")
End If
If B>0
B$=Left$(B$,B-1)+RIVI$(I,0)+Right$(B$,Len(B$)-B-Len(RIVI$(I,1))+1)
Goto JATKO2
End If
Next
Call Editor 71,,C$+B$
X=Free
Dialog Update 1,6,0
Exit
End If
Loop
End If
Exit If Mouse Key=2
Exit If Rdialog(1,1)=1
If Rdialog(1,5)=1
Call Editor 89
Dialog Update 1,5,0
End If
Ask Editor 4
Exit If Param=RIVI_MAX
Call Editor 2
Loop
For I=0 To 6
Trap Screen Show I
Next
Screen Close 7
Edit
' Command list
Data "BUtton","BU"
Data "PRint","PR"
Data "NoWait","NW"
Data "SetVar","SV"
Data "MEssage","ME"
Data "UNpack","UN"
Data "LIne","LI"
Data "VLine","VL"
Data "PUsh","PU"
Data "PUzzle","PU"
Data "BOx","BO"
Data "BPosition","BP"
Data "BReturn","BR"
Data "BChange","BC"
Data "EXit","EX"
Data "EDit","ED"
Data "DIgit","DI"
Data "HorizontalSlider","HS"
Data "HSlider","HS"
Data "VerticalSlider","VS"
Data "VSlider","VS"
Data "ScreenMove","SM"
Data "ArrayRead","AR"
Data "ARray","AR"
Data "ArraySize","AS"
Data "ActiveList","AL"
Data "AList","AL"
Data "InactiveList","IL"
Data "IList","IL"
Data "ZonePosition","ZP"
Data "ZPosition","ZP"
Data "ZoneChange","ZC"
Data "ZChange","ZC"
Data "ZoneNumber","ZN"
Data "ZNumber","ZN"
Data "HyperText","HT"
Data "HText","HT"
Data "BAse","BA"
Data "SIze","SI"
Data "SAve","SA"
Data "RunUntil","RU"
Data "ButtonQuit","BQ"
Data "SetZonevariable","SZ"
Data "ZoneVariable","ZV"
Data "CAll","CA"
Data "GraphicBox","GB"
Data "SetPattern","SP"
Data "GraphicSquare","GS"
Data "SetLine","SL"
Data "GraphicLine","GL"
Data "GraphicEllipse","GE"
Data "PrintOutline","PO"
Data "SetWriting","SW"
Data "SetFont","SF"
Data "TextWidth","TW"
Data "TextHeight","TH"
Data "TextLength","TL"
Data "CentreX","CX"
Data "VertText","VT"
Data "LAbel","LA"
Data "JumP","JP"
Data "JumpSubroutine","JS"
Data "ReTurn","RT"
Data "UserInstruction","UI"
Data "UserI","UI"
Data "BaseX","BX"
Data "BaseY","BY"
Data "SizeX","SX"
Data "SizeY","SY"
Data "ScreenWidth","SW"
Data "ScreenHeight","SH"
' Feel free to add commands