FREND.DOC  ·  DOC  ·  6.8 KB  ·  1991-11-01  ·  from WhatPC_Issue-28_Nov-1991
FREND v1.90 (c) 1991 ABS

To use FREND you should  create  a  'program'  file using the commands
listed below. This should be an  ASCII file, with each line terminated
by a carriage return and line feed, and should be called "FREND.MNU".

The format of each command is

   C param1 param2 param3 ...

Where 'C' is a command, and  the  'params' are parameters (or data) to
pass to the command.

A quick look at the commands will show how easy this is to use.

There MUST be one and ONLY one space between each parameter.

No blank lines are  allowed  in   the   file   but  commands may be in
either upper or lower case.

To run programs from the menu   try   the   R command. If this doesn't
work use the  slower  Y   command.   (You   should  always  use Y when
running a batch  file!  -   but   ensure   a  copy  of  COMMAND.COM is
available if it will be needed).


THE COMMAND SET

A : Access Drive

Change to another drive.

EXAMPLE: A B     or:
         A C:


B : Border number

Set the border colour. The colour must be between 0 and 15.

EXAMPLE: B 2


C : Cls

Clear the screen to black, using the current mode.

EXAMPLE: C


D : Display filename

Display a screen that was  previously  created using a screen designer
such as the Shareware program  CELLBOSS.  The  screens are direct text
mode images and exactly  4,000  bytes  long,  containing both text and
colour attribute information.

This command also accepts, an optional, second parameter 'type', which
should be a number  between  0  and  6,  which  will  cause one of the
following effects:

   0 drops a picture from the top.
   1 pulls it from the bottom.
   2 slides it from the left.
   3 slides it from the right.
   4 fades it in.
   5 "squashes" it in.
   6 "window blinds" it in.

Please note: If you do not have a suitable screen designer, contact us
at the address above  and  we  will  supply  you with the unregistered
version of CELLBOSS. If you find you  then use it, you should register
it separately with the authors, who are not associated with us.

EXAMPLE: D \menu\menu.scn        or
         D \menu\menu.scn 3      etc...


E : if file Exists GOTO label

Check for a file already existing.  If so, branch. Useful for checking
if you have already copied or installed a program.

EXAMPLE: E c:\demo\demo.exe installed


F : Force file name change

Rename a file.

EXAMPLE: F c:\demo\demo.asc c:\demo\demo.doc


G : Goto label

Goto a label that has been declared using a '.'.

EXAMPLE: G mainloop


I : If key number GOTO label

If the number following the 'I'  is  the  returned value of a key that
was pressed from inside the 'S'  (Store  key press) command, then GOTO
the line in the program immediately following the label name.

EXAMPLE: I 3 option3


J : Jump to start drive

Return to the drive from  which  the  program  was run. This is useful
when a program you call changes drive on you!

EXAMPLE: J


K : Kill file

Deletes a file, like DEL.

EXAMPLE: K \pathname\filename.ext


L : Locate x y

Move the screen cursor to a new position.

Note: 'L 0 25' will turn the curser off on 25 line text mode screens.

EXAMPLE: L 10 12


M : Mode number

Change the display mode to the number given.

3 = CGA text mode, which is  the  standard. But if the user is running
the program on a  Hercules  monitor,  mode  3  will actually switch to
monochrome correctly, so you don't need to worry about that.

This command is most useful to  restore  the screen to text mode after
running a  program  that  exits  in  graphics  mode,  (thus  making it
impossible to correctly display a  text  screen). This usually happens
if the user presses CTRL-C in  a  graphics  game,  so try and check if
that might happen,  or  always  use  "M  3"  after  calls  to graphics
programs.

EXAMPLE: M 3


N : New directory

Change directory. Same as CHDIR.

EXAMPLE: N \newdir\newsub


O : cOpy a file from source to destination

Copies a file.

Unlike the Dos COPY command you MUST specify full drive, path and file
names for both the source and destination files.

EXAMPLE: O a:\fred.exe b:\fred.exe


P : Print text to screen

Print a line of text,  starting  at  the current cursor position. Then
place the cursor at the start of the next line.

Enter 'P'  on  its  own  without  any  text  to  print  a  blank line.
Effectively this just moves the cursor to the start of the next line.

EXAMPLE: P This is some text.


R : Run filename parameter1 parameter2

Runs a file. You will usually  have to specify the program's extension
by using 'prog.exe' or  'prog.com'.  This  is  so  the the menu system
knows how to deal with it,  although  this is not always necessary. To
ensure this works properly, always use full path names.

EXAMPLE: R \programs\myprog.exe file1 file2


S : Store key press up to maximum key number

FREND will accept input from function keys  F1 to F9 or numeric keys 1
to 9. You must specify a second parameter which is the highest key you
wish to be available to the user.

You then determine the value of the key pressed using the 'I' command.

EXAMPLE: S 5             (only allow 1-5 or F1-F5)


T : Type file to screen

Type an Ascii file to screen,  a  page  at  a time, with "press a key"
prompts. The text is grey, with the prompt being yellow on blue.

EXAMPLE: T \program\info.txt


W : Wait

Wait for a key  press.  This  command  simply  waits  until any key is
pressed and then allows program flow to continue from the next line.

EXAMPLE: W


X : eXit

Quit to Dos (or the calling program), clearing the screen first.

EXAMPLE: X


Y : sYstem command

This is like the 'R' (Run  program)  command,  but is used for calling
batch files or in other cases  when  'R'  won't work. But remember, if
COMMAND.COM is not available to the user in  his or her path or on the
current disk, any commands that need to call it will fail!

However, most of these commands  are  replicated by this program, such
as these:

   'O' for COPY.
   'A' for CHANGE DRIVE.
   'N' for CHANGE DIRECTORY.
   'Z' for MKDIR.

So, where possible, try to use them instead of using 'Y'.

EXAMPLE: Y \database\menu.bat option1 option2


Z : Create Directory

This is the  same  as  MKDIR.  (Why  'Z'?  We  ran  out  of meaningful
letters!).

EXAMPLE: Z c:\utils


. : Define label

Mark a place in a program with a label that can be jumped to using 'G'
for GOTO, or implied GOTOs, as used  by  'I'  for 'If key' and 'E' for
'If Exist'. Labels are case  sensitive,  so  be careful, and make sure
you leave a space between the full stop and the label.

EXAMPLE: . label1


; : Remark line

Use this for documenting your programs.

EXAMPLE: ; This is a remark and does nothing.