home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TopWare 18: Liquid
/
Image.iso
/
liquid
/
top1106
/
gepackt.exe
/
TWTUT8.CHP
< prev
next >
Wrap
Text File
|
1993-05-25
|
11KB
|
470 lines
%
#EF
#TMULTI - MEDIA
#C2,R7
In this final Chapter we'll cover the ~HCommands~N which make ~H~bTutorialWriter~N
one of the most powerful ~G~IAuthoring Systems~N available today.
These ~HCommands~N allow you to add ~C~IMusic~N, ~C~IVoice~N, ~C~Iimported Textscreens~N, ~C~IANSI~N
screens, ~C~IGraphics~N and other ~C~Iexecutable programs~N to your ~M~Itutorials~N.
Let's start with the ~C~IMusic~N and ~C~IVoice Utilities~N on the ~G~IAuthor Utilities~N
~HMenu~N.
#W
#EF
#T
#GT,utilities
#D3
#BO,2,19,36,24,7,1,0,4,14,1
When you select Music Files and
choose Create a Music File, you
will be presented with the
following Entry Screen.
#GT,musicmaker
#D5
#BO,2,20,34,24,7,1,0,3,14,1
Pressing F1 brings up a Help
Menu, which is specific to
the Entry Field you are on.
#GT,music help
#D5
#BO,2,21,34,24,7,1,0,2,14,1
Here's an example of a Help
Screen in the Music Utility.
#GT,music notes
#D20
#GT,musicmaker
#D5
#BO,2,19,36,24,7,1,0,4,14,1
Now add your Musical Notation
according to the Help Screen
Instructions and press F10
to bring up another Menu.
#GT,music menu
#D5
#BO,2,19,38,24,7,1,0,4,14,1
Select Save and TutorialWriter
will automatically add the .MUS
extension to the filename you
chose.
#EL,25
#W
%
#EF
#TMULTI - MEDIA
#C2,R6
To play the ~HMusic File~N you have created within your ~M~Itutorial~N, the ~HCommand~N
is ~C~I#P~N followed by the name of your file e.g. ~C~I#Pmusicfile~N. You don't need
to add the ~H.MUS~N extension, because ~G~ITWTEACH~N automatically looks for a file
with that extension.
Creating ~HVoice files~N is even easier than creating ~HMusic~N files. Once again
we use the ~G~IAuthor Utilities~N and choose ~G~IVoice Files~N and ~G~ICreate~N. This is
the screen we are presented with.
#WP
#EF
#GT,create voice
#D5
#BO,2,19,36,24,7,1,0,4,14,1
Scroll up and down through the
available phrases then press
ENTER or a Mouse Button to
select one.
#GT,create voice 2
#D5
#BO,42,4,76,10,7,1,0,5,14,1
This brings up another Menu and
if you choose 'Add to Phrase'
the chosen phrase will be
joined to any you have already
selected, up to four phrases.
#GT,create voice 3
#D5
#BO,42,4,76,8,7,1,0,3,14,1
Then select Save to create a
Voice file. It will be given
the .VOI extension.
#EL,25
#W
%
#EF
#T
#C2,R6
To play the ~HVoice File~N you have created within your ~M~Itutorial~N, the ~HCommand~N
is ~C~I#V~N followed by the name of your file e.g. ~C~I#Vvoicefile~N. You don't need
to add the ~H.VOI~N extension, because ~G~ITWTEACH~N automatically looks for a file
with that extension.
And remember that you can use the ~C~I#V~N and ~C~I#P~H Commands~N in the ~HComments~N section
of ~G~ITests~N and ~G~IQuizzes~N. Just replace either the ~HComment~N above the ~HResults Graph~N
or the one below it with ~C~I#Vvoicefile~N or ~C~I#Pmusicfile~N.
#WP
%
#EF
#T
#C2,R5
Now let's look at the 'snapshot' ~HTEXT~N Screens. Included with ~H~bTutorialWriter~N
is a ~Hmemory resident program~N called ~G~ITWSNAP.COM~N. When you type ~G~ITWSNAP~N, the
program loads into memory, then when you press ~HALT-S~N ( hold down the ALT
key and press the S key ) it will copy anything on the screen into a disk
file. These files are automatically named ~G~ITWSNAP.000~N, then ~G~ITWSNAP.001~N etc.
~H~r REMEMBER this only applies to TEXT SCREENS. ~N
When you have finished using ~G~ITWSNAP~N, just type ~G~ITWSNAP~N again and it will
remove itself from memory, provided that you haven't loaded any other memory
resident programs after it. If you have it will give you a warning message.
#WP
%
#EF
#T
#C2,R5
Copy the ~G~ITWSNAP.00?~N files to your ~H~bTutorialWriter~N directory and using the
~G~IAuthor Utilities~N select ~G~ITextscreens~N and ~C~IAdd a Screen~N.
At the ~HEntry~N screen you will be asked for a file name . Press ~HF1~N and all files
called ~C~ITWSNAP.???~N will be displayed. Choose the one you want and give it an
~HIdentifier name~N.
~G~ITWRITER~N will store it under that ~Hidentifier~N in your ~G~ITextscreen~N file. Then you
can call it up in your ~M~ITutorial~N, using the ~HCommand~C~I #GT,identifier~N.
To see what all that looks like, here's the ~HEntry~N screen.
#WP
#EF
#GT,showtextscreen1
#EL,25
#D5
#BO,3,13,47,20,7,1,0,6,1,3
You have probably taken a number of
SCREEN SNAPS. Enter the filename of the
TWSNAP file you want and an identifier
name that the SNAP will be stored under
in the SCREEN file. Just press F1 to
get the file names.
#GT,showtextscreen2
#D2
#BO,3,14,40,18,7,1,0,3,1,3
Choose the one you want and make
up a identifier name for it.
And that's how easy it is!!
#EL,25
#W
%
#EF
#T
#C2,R5
Now here is something that you can do with these '~Hsnapshots~N'. When they are
popped on to the screen, they are just like any other screen that has been
written, so you can use ~C~I#Cx,Ry~N to move around and modify them.
Let's say that using a ~HText Screen Editor~N, you design your dream home and
use ~G~ITWSNAP~N to take a snap. You've used the ~G~IUtility~N program to store it in
the ~G~ISCREEN~N file as ~C~Idreamhouse~N.
Now you can call it up with ~C~I#GT,dreamhouse~N.
#WP
#GT,dreamhouse
#WN
%
#EF
#T
#C2,R5
Now, using the ~HCursor Control Commands~N and the ~HHYPERTEXT~N capability you
put ~HButtons~N on your drawing ( Remember to define them with the ~HHYPERTEXT~N
~C~IUtility program~N ).
#C1
{#GT,dreamhouse
{#TDREAM HOUSE
{#C10,R8
{|Bill's Room|
{#C23,R11
{|Bathroom|
{#C33,R8
{|Bert's Room|
etc.
#C2
And here's the final screen. Use the Space Bar or the MOUSE to move around
the Buttons, ENTER key or MOUSE button to select.
#WN
#GT,dreamhouse
#TDREAM HOUSE
#C10,R8
|Bill's Room|
#C23,R11
|Bathroom|
#C33,R8
|Bert's Room|
#C54,R8
|Sitting Room|
#C10,R15
|Bath|
#C9,R20
|Dressing|
#C24,R19
|Master|
#C60,R21
|Dining|
#C47,R21
|Kitchen|
#WP
%
#EF
#TMULTI - MEDIA
#C2,R5
There is another ~C~I#G~H Command~N which is very similar to ~C~I#GT,identifier~N. It is
~C~I#GA,ANSIfile.ext~N. This ~HCommand~N pops an ~G~IANSI~N file on to the screen, just like
a ~HTextscreen~N file. And like a ~HTextscreen~N file, you can use ~H~bTutorialWriter~N's
~HCommands~N to modify it.
To display an ~G~IANSI~N file, you must have ~G~IANSI.SYS~N loaded in your ~G~IDOS CONFIG.SYS~N
Almost all computers today have that as standard. But ~C~I#GA~N checks anyway and
will warn you if it is not there, suggesting that you load it by following the
instructions in your ~G~IDOS~N Manual.
The advantage of ~G~IANSI~N files is that they permit limited ~HAnimation~N. And there
are many ~G~IANSI~H Editor~N programs available which let you create ~G~IANSI~N files.
Here's how to use the ~C~I#GA~H Command~N :
~H#GA,judge.ans
~H#C8,R23
~H~~H~~KTutorialWriter wins the Verdict. It's the BEST. Case closed!!~~N~~k
#W
#EF
#GA,judge.ans
#C8,R23
~H~KTutorialWriter wins the Verdict. It's the BEST. Case closed!!~N~k
#WP
%
#EF
#T
#C2,R5
But if you want to show a graphics screen - perhaps a ~HPCX~N file - or even run
another program from inside your ~M~Itutorial~N - e.g. a program which draws a
graph or does something fancy to the screen, then there is another ~HCommand~N
available - ~C~I#U~N
The ~HCommand~C~I #Ufilename.ext~N[~C~I,Parameters~N] allows you to run an executable
program ( ~H.EXE~N, ~H.COM~N or ~H.BAT~N ) from within your tutorial. If the program
does not take parameters i.e. the program name alone runs it, then follow
the ~C~I#U~H Command~N with the ~Hfull program name, including the extension~N.
To give you an example of how this ~HCommand~N is used, I have included a file
called ~G~IUSFLAG.EXE~N with this ~C~ITutorial~N. This is a .PCX file which has been
converted to an executable program.
To activate this program, the ~HCommand~N is ~C~I#Uusflag.exe~N.
#WP
%
#EF
#T
#C2,R5
Many graphic display programs require a number of parameters to be passed.
Let's say you have one of these, called perhaps ~G~IShowpics.exe~N, which takes
the parameters ~G~IDisplayType~N ( either ~G~IEGA~N or ~G~ICGA~N ) and ~G~IPicturefilename~N. The
~HCommand~N would be ~C~I#Ushowpics.exe,EGA MyPic.pcx~N. The parameter section of the
~HCommand~N, which follows the comma, requires parameters to be ~Hseparated by one
space~N when there is more than one parameter being passed.
Let's look at an example of a simple executable file, which will point out
some other items to note.
~H#Uusflag.exe
~H#WN
#WP
#Uusflag.exe
#WN
#EF
#T
#C2,R5
The return to a blank screen from the executable points up something else
you may need to take care of. ~HSome executables save the screen before they
display the file and restore it afterwards, but most do not~N. This demo
program does not. So if you want to come back to this screen to add more
comments, you have to ~Hsave it with the ~C~I#SK,S,n ~HCommand~N, and restore it when
the executable program returns control to ~G~ITWTEACH~N.
And did you notice that the Cursor had been turned on? Use the ~HCommand~C~I #OF~N
to turn it off again. (You can also use the opposite ~HCommand~N, ~C~I#ON~N, if you ever
need to turn it on).
~H#SK,S,1
~H#Uusflag.exe
~H#SK,R,D,1
~H#SK,D,1
~H#C40,R18
~H#OF
~H~~K~~HHow about that!!!~~N~~k
~H#W
#W
#SK,S,1
#Uusflag.exe
#SK,R,D,1
#SK,D,1
#C40,R18
#OF
~K~HHow about that!!!~N~k
#EL,25
#WP
%
#EF
#T
#C2,R8
Alternatively, you may want to continue on a new screen.
~H#Uusflag.exe
~H#OF
~H#T
~H#C2,R5
~HStart again from here.
~H#W
#W
#Uusflag.exe
#OF
#T
#C2,R5
Start again from here.
#WP
%
#EF
#T
#C2,R5
An important aspect which must be considered when using ~C~I#U~N is the amount
of computer memory available. ~HWhen an executable program runs, it does
so in the amount of memory left unused by the ~M~Itutorial program~N. This raises
two points. The ~G~ITWTEACH~N program which you will distribute with your
application needs ~H100K of RAM for itself and a further 30K to enable it to
handle screen saves, etc. ( up to a max of 6 at one time )~N. If an executable
program does not run on a particular computer, you will have to advise the
user to ~Hremove any RAM resident programs from memory~N. If it still does not
run then ~Hthere is not enough memory available~N on that computer.
#WP
%
#EF
#T
#C2,R7
The second point is that, in your case, the ~H~bTutorialWriter~H Integrated
Development Environment, ~G~ITWRITER~N, needs ~H200K for itself and a further 30k for
editing text files, storing variables, etc~N. So when you test an application
which uses an executable program from within the ~H~bTutorialWriter~H Environment
( using ~C~I View Tutorial~N ), it may not work because of memory limitations.
If this happpens, exit from the ~HIntegrated Development Environment~N and test
the application using ~G~ITWTEACH~N.
#WP
%
#EF
#T
#AB,2
HAPPY
TUTORING
#WP
#X