home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1993 #2
/
Image.iso
/
wp
/
twriter.zip
/
TWTUT4.CHP
< prev
next >
Wrap
Text File
|
1993-05-25
|
11KB
|
491 lines
%
#EF
#TGETTING ATTENTION
#C2,R5
~H~bTutorialWriter~N is a ~HTEXT BASED~N program, so the ~HCommands~N operate only in
~HTEXT MODE~N. But that doesn't mean that your screens cannot be made interesting.
First, there are a number of ~HCommands~N, all beginning with ~C~I#A~N, which give
you access to ~HTEXT BASED~N graphics.
Then there are a group of ~HHighlighting Commands~N which begin with ~C~I#H~N and
some ~HNoise Commands~N which begin with ~C~I#N~N.
And we will also cover ~HHyperText~N and a ~HHelp System~N in this ~HChapter~N, with the
associated variations on the ~C~I#W~N (Wait) ~HCommand~N.
#W
%
#EF
#T
#C2,R5
Let's start with the ~C~I#A~H Commands~N.
Here they are in Summary form :-
~H #AH,Center,lines - Huge Robot Box
#AP,Center,lines - Pointer Box
#AR,Center,lines - Remember Box
#AL,Lines[,Fore,Back] - Logo Box
#AC,x1,y1,Fore,Back,message - Cheering Robot
#AB,lines[,Fore,Back] - Big letters~N
When you use these ~HCommands~N, remember to use ~H#D~C~In~N or ~H#W~N to hold the screen
long enough to read!!
#WP
%
#EF
#T
#C1,R9
#AH,1,9
~W #AH calls the Huge robot,
1 centers the Text, and
9 reads in the nine lines,
including blank lines, which
follow the command - ~N#AH,1,9
#W
#WN
#AH,1,9
#AH calls the Huge robot,
1 centers the Text, and
9 reads in the nine lines,
including blank lines, which
follow the command - ~N~c#AH,1,9
#WP
%
#EF
#T
#C2,R12
#AP,1,3
~W #AP calls the Pointer box, 1 centers
the text and 3 reads in three lines of
text - ~N#AP,1,3
#W
#WN
#AP,1,3
#AP calls the Pointer box, 1 centers
the text and 3 reads in three lines of
text - ~H#AP,1,3~N
#WP
%
#EF
#T
#C2,R12
#AR,0,4
~W #AR calls the Remember box,
0 says not centered, and 4
reads in four lines of
text - ~N#AR,0,4~N
#W
#W
#AR,0,4
#AR calls the Remember box,
0 says not centered, and 4
reads in four lines of
text - ~H#AR,0,4~N
#WP
%
#EF
#T
#C2,R12
{#AL,7
~W #AL calls the logo box which always
centers the text. 7 reads in seven lines
of text, including the blank lines -
~N#AL,7
#W
#WN
#AL,7
#AL calls the logo box which always
centers the text. 7 reads in seven lines
of text, including the blank lines -
~H#AL,7~N
#WP
%
#EF
#T
#C2,R5
The ~C~I#AC~H Command~N calls up the ~HCheering Robot~N. ~HIt does not clear the screen
like the other ~C~I#A~H Commands~N. The first two numbers after ~C~I#AC~N give the
~C~IColumn~N and ~C~IRow~N position of the robot. The next two give the ~C~Itext~N and
~C~Ibackground~N colors to be used. Finally comes the text to be displayed.
~HUse the In-line Commands to set the text color~N.
~H#AC,12,7,13,0,Three little
~H#AC,50,18,15,0,~~r~~Y~~ICheering~~N
~H#AC,60,7,14,0,~~W~~I~~FRobots~~N
#W
#AC,12,7,13,0,Three little
#AC,50,18,15,0,~r~Y~ICheering~N
#AC,60,7,12,0,~W~I~FRobots~N
#EL,25
#WP
%
#EF
#T
#C2,R5
The ~HCommand~C~I #AB,Lines[,Fore,Back]~N puts ~HBig Letters~N on the screen. The screen
can only accept up to ten letters or spaces in any one line, and a maximum
of three lines. The colors can be set by giving values for ~C~IFore~N and ~C~IBack~N,
otherwise the default normal colors will be used. Each line is centered on
the screen. If ~C~ILines~N has a value of 3 the complete screen is used, with no
room for a Title. If there are less than 3 lines, they will be centered
vertically on the screen. Let's look at some examples.
~H#AB,1
HELLO
#SK,S,1
#WN
#AB,1
HELLO
#D5
#SK,R,N,1
#WN
#EL,19
#EL,20
#C2,R19
~H~K#AB,2,15,1
HELLO
THERE~N~k
#WN
#AB,2,15,1
HELLO
THERE
#D5
#SK,R,N,1
#EL,19
#EL,20
#EL,21
#C2,R19
~K~H#AB,3,0,7
IS
ANYBODY
LISTENING?~N~k
#WN
#AB,3,0,7
IS
ANYBODY
LISTENING?
#D5
#WP
#SK,D,1
%
#EF
#T
#C2,R7
With ~H~bTutorialWriter~N highlighting is often done using the ~HInline Commands~N
which control colors, click-writing and slow-writing. But there are many
other ~HCommands~N available.
~H#HH,x1,y1,x2,Linetype[,Fore,Back]~N Horizontal Line
~H#HV,x1,y1,y2,Linetype[,Fore,Back]~N Vertical Line
~H#HP,Pointer,Direction,x1,y1[,Fore,Back]~N Pointers
~H#HF,x1,y1,x2,y2,n,[,Fore,Back]~N Fill Screen
~H#HS,x1,y1,x2,y2,[,Fore,Back]~N Color Screen Section
~H#NType~N Sounds
#WP
%
#EF
#T
#C2,R5
~H#HH,x1,y1,x2,Linetype[,Fore,Back]~N Horizontal Line
~H#HV,x1,y1,y2,Linetype[,Fore,Back]~N Vertical Line
These two ~HCommands~N draw lines. ~C~I#HH~N draws a ~HHorizontal~N line from ~HColumn~C~I x1~N to
~HColumn~C~I x2~N on ~HRow ~C~Iy1~N. ~C~I#HV~N draws a ~HVertical~N line from ~HRow ~C~Iy1~N to ~HRow~C~I y2~N at
~HColumn~C~I x1~N. ~C~ILinetype~N takes the values of ~H1 for a single line~N and ~H2 for a
double line~N. The color of the line can be selected using ~C~IFore~N and ~C~IBack~N. The
position of the cursor is not changed, nor are the colors that were being used
prior to this ~HCommand~N being implemented.
~H#HH,18,13,72,2,12,0
~H#HH,18,15,72,1
~H#HV,18,13,15,1
~H#HV,72,13,15,2,13,0
#D50
#HH,18,13,72,2,12,0
#D3
#HH,18,15,72,1
#D3
#HV,18,13,15,1
#D3
#HV,72,13,15,2,13,0
#WP
%
#EF
#T
#C2,R5
~H#HP,Pointer,Direction,x1,y1[,Fore,Back]~N Pointers
This ~HCommand~N allows you to point at specific items on the screen. ~C~IPointer~N
takes the values ~C~IA~N for ~HArrow~N or ~C~IT~N for ~HTriangle~N. ~C~IDirection~N takes the values ~C~IU~N
for ~HUp~N, ~C~ID~N for ~HDown~N, ~C~IR~N for ~HRight~N and ~C~IL~N for ~HLeft~N.
Let's put a mis-spelled word on the screan, point it out and change it.
~H#HP,T,R,37,13,15,4
~H#HP,T,L,44,13,15,4
~H#HP,A,D,42,12,14,4
~H#HP,A,U,42,14,14,4
~H#C38,R13
~H~~Hscreen
#WN
#HP,T,R,37,13,15,4
#D2
#HP,T,L,44,13,15,4
#D2
#HP,A,D,42,12,14,4
#D2
#HP,A,U,42,14,14,4
#D3
#C38,R13
~Hscreen
#EL,25
#WP
%
#EF
#T
#C2,R5
~H#HF,x1,y1,x2,y2,n,[,Fore,Back]~N Fill Screen
~H#HS,x1,y1,x2,y2,[,Fore,Back]~N Color Screen Section
The ~HCommand~C~I #HF~N fills an area of the screen from column ~C~Ix1~N, row ~C~Iy1~N to column
~C~Ix2~N, row ~C~Iy2~N with the ~HASCII Character~N represented by the number ~C~In~N. ~C~IFore~N and
~C~IBack~N select the colors to be used. The ~C~IHELP~N system in ~H~bTutorialWriter~N's ~C~IEditor~N
shows a screen of ~HASCII Characters~N and their numbers.
#SK,S,1
#WN
#GT,edithelp
#D20
#GT,ascii help
#EL,25
#WN
#SK,R,N,1
#EL,25
#W
#C2,R16
The ~HCommand~C~I #HS~N colors an area of the screen from ~C~Ix1~N,~C~Iy1~N to ~C~Ix2~N,~C~Iy2~N in the colors
~C~IFore~N and ~C~IBack~N. It does not clear the section - just changes the color!
~H#HS,1,5,80,18,0,2
~H#D5
~H#HS,1,5,80,18,14,0
#EL,25
#WN
#HS,1,5,80,18,0,2
#D5
#HS,1,5,80,18,14,0
#SK,D,1
#EL,25
#WP
%
#EF
#T
#C2,R5
Let's look at an example of the use of these two ~HCommands~N.
~H#HF,10,12,70,20,232
~H#D1
~H#HS,10,12,70,20,15,1
~H#D1
~H#HS,10,12,70,20,1,2
#WN
#HF,10,12,70,20,232
#D1
#HS,10,12,70,20,15,1
#D1
#HS,10,12,70,20,1,2
~N
#EL,25
#WP
%
#EF
#T
#C2,R5
There are four ~HSound Commands~N. ~C~I#NB~N makes the standard computer ~HBeep~N. ~C~I#NC~N is
a ~Htwo-tone Chime~N. ~C~I#ND~N is a sound intended to ~HDiscourage~N - the raspberry.
And ~C~I#NE~N sounds some pleasant random notes, computer music, intended to be
~HEncouraging~N. Here's what they sound like :
#D50
~H#NB
#NB
#D3
~H#ND
#ND
#D3
~H#NE
#NE
#D3
~H#NC
#NC
#WP
%
#EF
#T
#C2,R5
One ~HInline Command~N we didn't cover which is different from the others is the
#C2,R7
{|
#C4,R7
sign which marks a word or phrase up to 30 characters as a ~HHYPERTEXT Button~N.
#C2,R9
The
#C6,R9
{| sign is placed immediate before and immediately after the word or phrase.
~H
#C2,R11
{|streptomycin|
~N
#C18,R11
would appear on screen as a ~HButton~N i.e. black text on a grey
#C2,R13
background. The information screen which will appear when the ~HButton~N is
activated is defined by the ~C~IUtility~N program within the ~HIntegrated Development
Environment~N. Make sure that the screen ~HButton~N word is absolutely identical
to the one you define or it will not be recognized. Up to ten ~HButtons~N can
be out on a single screen, and up to 100 for the complete ~M~ITutorial~N. All the
~HButtons~N on a screen become active when the ~C~I#W~N ( ~HContinue Command~N) is used.
#WP
%
#EF
#GT,main menu
#BO,3,4,50,8,7,1,0,2,1,3
To create the HyperText information choose
Utility Programs at the Main Menu.
#EF
#GT,utilities
#EL,25
#BO,3,4,45,8,7,1,0,3,1,3
Then choose HyperText to create a
HYPERTEXT Button. Here's what the
entry screen looks like.
#EF
#GT,create hyper
#EL,25
#D10
#BO,3,4,42,8,7,1,0,3,1,3
This was the screen I wrote to give
the HYPERTEXT explanation for
CHAPTER in the Structure Diagram.
#WP
%
#EF
#T
#C2,R9
And just to let you test it, here's the Button Word |CHAPTER|. Highlight
it using the ~HSpaceBar~N, ~HMouse~N or ~HArrow Keys~N and press ~G~IENTER or the ~G~IMouse
Button~N. Press ~G~IENTER~N or the ~G~IMouse Button~N to remove the information screen.
#WP
%
#EF
#GT,utilities
#BO,3,4,45,8,7,1,0,3,1,3
And now for the HELP SYSTEM. This is
an example only since this Tutorial
does not have a HELP system
#EF
#GT,create help
#EL,25
#D5
#BO,3,14,47,19,7,1,0,4,1,3
Not too difficult, is it? Test out the
HELP screen we just created by moving
to the Help option at the bottom of the
screen and pressing ENTER or Mouse Button
#WP,H
%
#EF
#T
#C2,R6
Activating the ~HHELP~N System is done through the ~C~I#W~H Command~N, which has a number
or variations.
The ~C~I#W[Switch[,Switch[,Switch] ~HCommand~N is the ~HWait Command~N. Used in the form
~C~I#W~N it will put two ~HMOUSED~N boxes on the screen - ~w~ZCONTINUE~N and ~w~ZQUIT~N.
With or without ~C~ISwitches~N, the ~C~I#W~N Command will make any ~HHYPERTEXT Buttons~N on
the current screen active. Adding ~C~IN~N to ~C~I#W~N will suppress the ~w~ZQUIT~N box, and
adding ~C~IH~N will make your ~w~ZHELP~N ~HMENU~N active. Adding ~C~IP~N will allow ~w~ZPAGEBACK~N. The
~C~ISwitches~N can be added in any order, but watch the commas - e.g. ~C~I#WH,P,N~N
#WP
#X