home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 5
/
FreshFish_July-August1994.bin
/
tools
/
kingfisher
/
rexxfisher.doc
< prev
next >
Wrap
Text File
|
1994-05-30
|
8KB
|
208 lines
RexxFisher 1.4
Copyright © 1992-1994 by Udo Schuermann
All rights reserved
All commands sent to RexxFisher have an RF_ prefix to prevent confusion
with standard ARexx commands. I think QUIT is a normal ARexx command, and
so might be a few others here or there. You can use these commands in any
mix of upper and lower case letters that you like.
The only commands you can execute WITHOUT a prior RF_HELLO command are
the following; they do not access the database and in fact do not even
require that KFServer is running!
RF_VERSION Returns RexxFisher's version tag, without the $VER:
portion, of course. This will ALWAYS use the
standard Style Guide compliant format such as:
RexxFisher 1.4 (30.5.94)
RF_HELP Returns a list of all acceptable commands as well
as some sort of command template to help you figure
out what sort of parameters you might be able to
get away with.
RF_QUIT Tells RexxFisher to shutdown. In a real
environment, you might want to issue a command such
as "RF_DISABLE RF_QUIT" to prevent the QUIT command
from being recognized. This will also suppress the
command from being listed by RF_HELP.
Despite a disabled RF_QUIT, RexxFisher will
respond to a CTRL_C signal such as those sent by
the c:BREAK command.
RF_DISABLE Disables a command so that RexxFisher will no
longer be able to execute it. This prevents
accidental shutdown of RexxFisher, for example by a
"rogue script"
The following command will attempt to start the KFServer, unless it is
already running:
RF_HELLO Needs no previous login and will establish a
connection to the KFServer. If the KFServer is not
running, RexxFisher will attempt to start it in the
exact same way that KingFisher (the GadTools
client) tries to start KFServer. The only problem
is that RexxFisher cannot (yet) be told to look in
a place OTHER than the default directory for the
KFServer. Start RexxFisher in the same directory
where KFServer is located and all will be fine.
You should give a nice and descriptive name along
with the RF_HELLO, such as:
RF_HELLO "BLAZEFISHER ARexx Script"
(my apologies, Dan! :^)
If you issue RF_HELLO when already connected, then
RexxFisher will issue an implicit RF_BYE command to
the server to disconnect you. RexxFisher will also
do this when it is made to shutdown (either with
RF_QUIT or through a c:BREAK signal.)
The following commands can be issued only if you have issued a successful
RF_HELLO command:
RF_BYE Sign off from the KFServer. This terminates your
access to the server. If you forget this, then
RexxFisher keeps the connection active for the next
script, which may be confusing. RexxFisher has no
idea, of course, if your script has terminated or
is just idling around for no particular reason.
RF_LIST This obtains a list of all available databases from
the server. The format of this list is as follows:
"Description\1database.kfdb\n
Description\1database.kfdb\n"
Which means that there are one or more lines of
text each of which begins with a nice descriptive
text for the database followed by a \1 character
(which is an ASCII 1, ^A symbol) and followed then
by the .kfdb name which you would need to give to
the server through the RF_USE function to make a
selection.
RF_USE This selects a database by giving it the name of a
.kfdb file. Please see RF_LIST above for more
information.
RF_FIND This command is suffering from extreme lack of
implementation :-/ All the hooks are in place and
you're welcome to see how far it will take you, but
it's not yet finished. Here is what it WILL do:
RF_FIND "expression"
Allows the use of the same expression
syntax as KingFisher. See KingFisher.DOC
for details. The expression is compiled
and the function begins a search at once.
If you receive an error, the result string
is in the format "Error X in column Y"
where the error values are these:
1 Comparison Expected ($ = != < > >= <=)
2 Operator Expected (AND, OR, XOR)
3 Invalid Comparison (ex: <! >< ... are bogus)
4 Mismatched Parentheses
5 Field Expected (must use "field op value")
6 Unsupported Feature (no hints yet :)
7 Internal Error
8 Incomplete Expression
RF_FIND AGAIN
Search onward with the previously used
expression. You must have an expression
compiled, otherwise this will not work.
RF_FIND OPTION x
Alter the behavior of the FIND command
according to the option x:
FORWARD Search forward
BACKWARD Search backward
CASEIGNORE Upper/lower case ignored
CASEEXACT Upper/lower case important
TRIMBLANKS Trim trailing blanks off search-strings
NOTRIMBLANKS Do not trim blanks
SIMPLEEXPRESSION Uses original KF1.40 expressions
COMPLEXEXPRESSION Uses new KF2.0 expressions
SHOW List current options
There is no way to interrupt a search at this time.
RF_GETFISH Retrieve a specific fish by record number. The
command has a second, optional parameter that
determines if the resulting string is formatted or
retrieved in raw form. A positive number for the
2nd parameter indicates the column width of the
display that the text should fit. The resulting
text, when formatted, will have an appearance much
like that in KingFisher's ListView.
A 3rd parameter specifies a display format
other than the default. Please read KingFisher.DOC
for more information on how to construct such
format strings.
RF_OBTAIN Obtains a variety of information from the server,
according to the parameter given:
DISK The current disk number.
FISH The current fish number, usable as the 1st
parameter to the RF_GETFISH command.
FLAGS The flag bits of the current fish; the
values currently defined, although not
necessarily setup for each fish, are:
0x0100 Marked for retrieval
0x0200 Marked for ownership
0x0400 Marked to stay hidden in searches
0x0800 Marked to be deleted
Bits in the range 0x0001 through 0x0080 are
user defined.
PVER The fish number of the PREVIOUS VERSION;
the value 0 is returned if no previous
version exists.
NVER The fish number of the NEXT VERSION; the
value 0 is returned if no next version
exists.
DBNAME The descriptive name of the database in
use.
DBFILE The filename (ending with .kfdb) of the
database in use. Such a filename can be
passed to the RF_USE command.
DBSIZE The number of records in the current
database, which is also the highest fish
number you can pass to the RF_GETFISH
command.
RF_STATUS Retrieves status information from the server. This
is effectively the same as what KingFisher displays
in the Status command (rightAmiga-I) except that it
applies to RexxFisher.
A demonstration script, RexxDemo.kfrx, is supplied for your enjoyment.
This script assumes that you have started KFServer and RexxFisher and that
they are running in the background. Enter "rx rexxdemo.kfrx" to run the
demo script.
Bugs: If RexxFisher tries to startup the KFServer and this fails (because
the KFServer cannot be made to startup for one reason or another)
then RexxFisher may crash the system with an Illegal Instruction.
This problem will be taken care of in a future release!
._. Udo Schuermann
( ) walrus@wam.umd.edu