home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hall of Fame
/
HallofFameCDROM.cdr
/
graphic1
/
keydrw-1.lzh
/
HYPERDRW.TXT
< prev
next >
Wrap
Text File
|
1989-08-04
|
19KB
|
369 lines
HYPERDRAW and HYPERSHELL
Introduction
Welcome to the world of HyperDraw, HyperShell, and PC-KEY-DRAW
Version 3.6*. The following information is provided to aid users
of PC-KEY-DRAW in using the features of HyperDraw and HyperShell.
First a little background information on how HyperDraw came to be
a part of PC-KEY-DRAW, then a quick look at the terminology,
followed by information on using hypertext stacks, including a
discussion of two stacks supplied with PC-KEY-DRAW, and finally a
look at creating your own HyperDraw stacks. It's easier than you
may think. For more information on HyperDraw, hypertext, and
hypermedia see the October 1988 issue of BYTE magazine and the
October 3, 1988 issue of Newsweek. There are also numerous books
written on HyperCard for the Macintosh.
The discussion of HyperDraw is followed by a discussion of
HyperShell which first became available in Version 3.6 and
compliments HyperDraw quite nicely. HyperShell allows
PC-KEY-DRAW to run other programs or perform DOS operations from
within the program.
The addition of HyperDraw makes PC-KEY-DRAW a brand new program
in many ways and as far as I know without equal in the IBM PC
shareware world. HyperShell and the other additions of 3.6
extended the range of PC-KEY-DRAW significantly. I would
appreciate any comments or suggestions.
HyperDraw
Background
Many new features were added to Version 3.5, but perhaps the most
significant improvement and definitely the most exciting is the
addition of HyperDraw capability to PC-KEY-DRAW. PC-KEY-DRAW can
now be used as a graphic based data base. It lets you link
screens together so that the user can easily flow from one screen
to the next. This is a great way for organizing many different
types of information that includes pictures and text. HyperDraw
is very similar to the HyperCard capability of the Mac. Creating
linked databases in PC-KEY-DRAW is easy and using them is simple.
The tutorial disk is my first attempt at using HyperDraw. It
provides an interactive tutorial for PC-KEY-DRAW that can lead
the beginner through all of the basic functions of the program.
See Using Stacks for more information on the tutorial disk.
To say the least, I am very excited about HyperDraw. I see
tremendous potential with a wide range of uses. It is ideal for
interactive slide shows, for education, for picture databases,
family trees, scheduling diagrams, drawing detailing and so much
more.
HyperDraw works by creating tags on the screen. A tag is a
section of the screen with associated action. Currently the
actions included run a macro (1), load a screen (2), or load a
partial screen (3). Only screens have tags and any screen can
have up to eight tags in Version 3.5* or eighteen tags in Version
3.6*. Each tagged screen can have eight/eighteen tags and so on,
so there is no limit. Additional tags and tag types will
probably be added in future versions. The eighteen tags per
screen provided in Version 3.6 should be more than sufficient for
most applications.
You might find the history of HyperDraw interesting. Ever since
I first put macros in the program I have wanted to have a way to
tag areas of the screen so that the user could define actions to
take place when the tagged area was selected with the cursor. I
never could figure out a way I liked for doing it. In the spring
of 1988, I saw HyperCard demonstrated on the Mac and I again got
interested in the idea, but once again was not happy with any
approach to the problem I could think of. Several weeks later, I
received a letter from a long time user of PC-KEY-DRAW
complaining about the .DAT files that accompanied the .SCN files.
They contained the scale information for a drawing, but tended to
waste a lot of disk space. I decided to encode the scale
information in the .SCN file. Several days later I saw the movie
BIG in which the main character develops an interactive comic
book, which I realized was basically HyperCard and I realized the
technique used for the scale information could be used for saving
tag information, giving PC-KEY-DRAW HyperCard features. A couple
of long days later and PC-KEY-DRAW had its own database
structure.
Several months after Version 3.51 started shipping, BYTE magazine
arrived in the mail with several excellent articles on hypertext.
I was surprised to find out that the concept of hypertext goes
back to 1945. It has been a long time in coming to the PC world,
but the wait may have been worth it. In Byte, Janet Fiderio,
points out that as a minimum, hypertext "is a DBMS that lets you
connect screens of information using associative links.", while
at its maximum "hypertext is a software environment for
collaborative work, communication, and knowledge acquisition."
She goes on to say that "Hypertext products mimic the brain's
ability to store and retrieve information by referential links
for quick intuitive access."
Terminology
The terminology of HyperDraw is simple, but there are several
terms that must be understood. In many ways using hypertext to
organize data is like using a stack of 3X5 file cards. Each card
contains a portion of the information contained in the entire
stack. Card and screen are used interchangeably, while the term
"stack" is used for a group of HyperDraw screens linked to each
other. Linking of individual screens in HyperDraw to other
screens in a stack is accomplished by tagging a portion of the
screen with the name of screen, picture or macro to link to. A
"tag" is the name, type, and button location used to link to the
next screen in the stack. The tag information is encoded in the
screen file. (SCN extension files) Starting with Version 3.6, 18
tags per screen are allowed per individual screen. The term
"button" is used to describe the portion of the screen that
activates a particular tag by clicking on that area with the
cursor. Buttons may be as small as a dot or as large as the
entire screen, they may also be visible and invisible. Buttons
are created on the screen by using any of the programs drawing
functions. Sets of buttons can be saved to disk and retrieved as
symbols. A button might say "Push Here", "Click On This", or
simply give the name or icon of the appropriate action. Anything
on the screen can be a button. Invisible buttons are simply areas
on the screen that have been tagged but not delimited by a
picture, icon, or word.
Using Stacks
Using HyperDraw stacks couldn't be easier. Once a stack has been
created anyone can move through the stack simply by "clicking" on
the desired button. To click on a button, move the cursor into
the area designated on the screen using the cursor pad, joystick
or mouse. Hit the <ENTER> key, the trigger, or the first mouse
button to activate the tag the cursor is on. Tagged areas are
always rectangular, even if the visible button is not. If nothing
happens, you are probably not inside of the tagged area. When an
area is clicked on the appropriate action is taken, either a
macro is run, a screen is called up to replace the current
screen, or a picture is overlaid onto the screen. Cursor movement
with the keyboard or a mouse is fine for most uses, but a short
cut is provided with the keyboard and the <J>ump command.
Selecting <J> from Cursor Mode will provide a chance to jump to
one of the eight possible tags. Enter the desired tag number and
the cursor will instantly jump to the top left corner of the
tagged area. Hitting <ENTER> will then activate the tag.
Once you enter a stack the words "Home" and "Back will appear in
the bottom left and right corners of the screen. "Home" and
"Back" are both buttons. "Home" will take you back to the very
beginning, where you entered the stack. "Back" will back up
through the stack, one step at a time, until you reach the place
you entered a stack. The <Back Space> key can be used instead of
moving over "Back" and clicking. No key equivalent is provided
for "Home".
How you move through a stack depends on the how it was created.
Some stacks will be essentially sequential in design, while
others will take a hierarchical form resembling the branches of a
tree. In a sequential stack the user starts at the beginning and
moves to each subsequent screen in sequence. This is how you
would read a novel. In a stack set up like branches in a tree
the user can move down the desired path from one branch to the
next, occasionally backing up to go down a different branch. This
is how you would use a reference book.
The disk drive to save drawings on must be set to the drive:\path
that contains a given stack. A drive cannot be specified in the
tag name.
The following discusses two rather different stacks that have
been created in PC-KEY-DRAW using HyperDraw. The first is the
tutorial stack created to provide an interactive lesson in
learning and using PC-KEY-DRAW. The second stack is a 3-D maze
game that is created primarily for fun. Other stacks are in the
works.
Tutorial Stack
The tutorial disk for PC-KEY-DRAW is the first in a hopefully
long line of applications for HyperDraw. It provides an
interactive tutorial for PC-KEY-DRAW that can lead the beginner
through all of the basic functions of the program. The user
proceeds at his own rate and in any order desired. The tutorial
disk should go a long way in helping the novice get started with
PC-KEY-DRAW. To use the tutorial put disk T-1 in the drive for
drawings and run the TUTORIAL macro with <Alt-k r>. Just follow
the on screen prompts and click on the desired action with the
cursor, mouse or joystick.
Maze Stack
In the September, 1988 issue of Scientific American, A.K. Dewdney
discusses three dimensional mazes and presents a 3-D maze based
on the legend of Daedalus' Labyrinth. The discussion of three
dimensional mazes is fascinating and inspired me to create a
computer version of the maze using the HyperDraw capability of
PC-KEY-DRAW.
MAZE.ARC contains a number of screen files for PC-KEY-DRAW, Ver
sion 3.50 or later, that form a 3-D maze. You can move through
the various levels of the maze by moving the cursor with a key
board, mouse, or joystick and clicking to go up or down in the
maze to another level. A map of the entire level is available by
clicking outside of an up or down button. A thread back to the
surface is provided by the <Back Space> command.
To use the maze start by creating a subdirectory on your hard
disk. Unarc MAZE.ARC into the subdirectory, about 800K will be
needed. Run PC-KEY-DRAW, Version 3.5 or later. Set "Drive for
Completed Drawings" as the drive and subdirectory that contains
the unarced files of MAZE.ARC by using the Status Screen
<Ctrl-s>. Load the first screen using <F8 o START(Cr) y>, where
(Cr) stands for <ENTER> or <Return>. Click on START. Follow on
screen instructions.
To learn more about this and other three dimensional mazes, check
out Scientific American, Computer Recreations, September, 1988.
Enjoy the maze and PC-KEY-DRAW. Good luck in finding a solution.
Creating Stacks
Many users will be content with using stacks created by others,
but sooner or later you will want to try your hand at it.
Creating a stack is actually very simple. The screens used in a
stack are created using any or all of the programs
drawing/painting functions or they can be captured from other
programs. Once the individual screens are created they are
linked to other screens, macros, or overlays by tagging a portion
of the screen and specifying the action to take. The tagged
portion of the screen generally corresponds to a visible button
on the screen created as if it where a part of the screen. The
actual tag can be smaller or larger than the visible button.
To start a tagging operation move to one corner of the tag
rectangle and select <Alt-k t>. The program will prompt you to
mark the opposite corner by moving the cursor and forming the
desired rectangle and then hitting <ENTER>. The current tag list
for the screen is displayed in the top left corner of the screen
and the program will prompt for the tag number to use. Select an
empty tag or replace an existing tag. When a user clicks on a
tag, the program will use the first tag it finds that matches the
screen coordinates of the cursor. This allows tags to be within
other tags. Only the first tag is activated. The tutorial stack
uses this in the first screen to provide help information when a
user is unsure where to start. The same technique is used in the
MAZE game to bring up a map of the level.
Next the program asks for the tag type. Versions 3.5* and 3.6*
has three types of tags that can be activated. Future versions
will have additional tag types for more power.
Type two (2) is the most common type as it calls another screen
(SCN extension) in much the same way as calling a screen with <F8
o>ld. Each screen can have its own eighteen tags. This is the
primary method of linking screens of information. The other two
types are used to supplement screen files.
Type three (3) loads a picture file (PIC extension) over the top
of the current screen. It is an ideal way of providing
additional information or providing help. The picture file will
load so that the top left corner of the picture matches the top
left corner of the tag. Picture files do not have their own tags
and thus the existing screen tags remain unchanged. In Version
3.6, when a partial screen tag is clicked on the partial screen
will appear. Clicking a second time in the same tag area will
cause the program to look for a second tag.
Type one (1) runs a macro file (MCR extension), thus allowing
any PC-KEY-DRAW function to be called from a tag. The macro will
start as if the cursor was in the top left corner of the tagged
area. There are many uses of the macro command, including
animation to illustrate a point. Screens and pictures can also
be loaded using a macro, but it is generally desirable to load
them as type 2 and type 3 tags. Version 3.6 allows macros
execution to include BATch file type commands in HyperShell.
This allows PC-KEY-DRAW to run other programs simply by clicking
on a HyperDraw tag, thus PC-KEY-DRAW can now be used as a
graphics based DOS menu program.
A tag type zero can also be entered, which will cause the current
tag entry for the specified tag number to be erased. To simply
view a list of the tag names select <Alt-k t ENTER Esc>.
Finally, the name of the tag must be specified. This is the name
of the appropriate macro (type 1), screen (type 2), or picture
(type 3). The program does not check if the appropriate file is
available on the drawing disk until the tag is activated. It is
good practice to save the screen file to disk, before activating
a tag to test it out.
That is all it takes to create your own stack. Once a stack is
created it can be added to or changed just as easily. Since the
tag information is contained in each screen file, relationships
need only to be set up once. For example, a screen contains
several tags and an animation sequence. When that screen is
called by a new screen, all of the tag information comes along.
HyperShell
Version 3.6 adds the ability to run other programs or preform DOS
commands from inside of PC-KEY-DRAW. There are many uses for
this, but one of the more exciting uses is to combine the shell
capability with the HyperDraw capability, allowing a program to
be run by clicking on a button in a card. This can be set up so
that PC-KEY-DRAW becomes a graphics based DOS menu program for
organizing the programs on a hard disk.
Background
Generally, a program that shells to DOS leaves behind a large
portion of the program in memory, so it can return to where you
left off when the shell is exited. PC-KEY-DRAW uses a simple
trick, so that virtually all memory is return for use by DOS or
the called program, only 100 bytes are lost. HyperShell operates
by creating a BATch file with the sequence of DOS commands to be
executed. The second to last line in the BATch file returns to
the directory containing PC-KEY-DRAW and the last line calls
PC-KEY-DRAW. These last two lines are automatically added to the
BATch file you created during the shell process.
For the BATch file trick to work, PC-KEY-DRAW must be called from
KD.BAT. Executing KD_DRAW.EXE directly will not allow the use
of HyperShell. KD.BAT contains several extra commands that could
be placed in a similar BATch file for a custom application. If
KD.BAT is called initially with a MaCRo name specified on the
command line, that same MaCRo will be used to reload PC-KEY-DRAW.
This is how a menu system would operate or how one would set up
when using virtual page operation. If a MaCRo name is not
specified initially, PC-KEY-DRAW is reloaded with the last screen
being worked on, ready for continuing operation.
Using HyperShell
HyperShell is easy to use. Always be sure to call PC-KEY-DRAW
from KD.BAT. The shell is reached with <F8 Alt-e> alternate
exit. PC-KEY-DRAW may first save the workspace screen and then
provides an input screen for putting in the DOS commands. Enter
commands exactly as you would in a BATch file. Entering a blank
lines signifies completion of command input and causes the
entered commands to be executed. Once entered, a command cannot
be edited directly. If the command to be executed is an EXE or
COM file, simply enter the name of the file and it will be run.
You may need to proceed running the file with a change in path or
drive, if required. If the command is another BATch file it is
necessary to call the BATch file rather than run it directly. If
a BATch file is run directly, control is turned over to it and
you will never return to PC-KEY-DRAW. In DOS 3.3 use CALL
followed by the name of the BATch file to run and control will
return on completion. In earlier versions of DOS you must use
COMMAND /C followed by the BATch file name. This causes a second
copy of DOS to be loaded and takes up RAM memory that will not be
available to the called program.
If the command is one that you will want to use again, such as
part of HyperDraw, record the command sequence as a MaCRo using
<Alt-k c>reate. Each time that MaCRo is run it will create the
BATch file and perform the specified action. Once a MaCRo is
created, it can be assigned as a hypertext tag for any screen. A
menu application would consist of a menu screen and a number of
MaCRos tagged to the screen that would load and run the
appropriate program.