		       @4BitCom -- Communications System@1
			   @3SCRIPT/ACTION FILE HELP@1

@5FUNCTION KEYS:@1
@H	Show this help page.
@Q	Return to Previous Menu.
@F	Move cursor to previous field.
@f	Move cursor to next field.
@S	Move cursor right.
@s	Move cursor left.
@C	Begin running entered file name.

This screen allows you to enter the name of a SCRIPT file (if you were
previously in the main menu) or an ACTION file (if you are currently
connected).  SCRIPT files must have a file extension of .SCP, and ACTION
files must have an extension of .ACT.  ACTION files are invoked to perform
tasks after you have made a connection.  SCRIPT files are used to actually
make a connection.  The files may be created with any standard text
editor.

In addition to giving the name of the file, you may specify parameters to
be passed to that file.  Parameters are entered in the "Args" field.@
		       @4BitCom -- Communications System@1
			   @3SCRIPT/ACTION FILE HELP@1

@3Introduction:@1
SCRIPT/ACTION files contain lines with a high level language which tells
BitCom what to do.  These lines consist of assignment statements,
conditional statements, branch statements, and function calls.	Comments
may be placed anywhere in a file by surrounding the comment with opening
and closing curly brackets '{' and '}'.  However, comments must begin and
end on the same single line.  Also, alphabetic case is ignored at all
times (except for strings being sent to the host or typed at the
terminal).  Thus 'Bell' = 'BELL' = 'bell'.

Space limitations prevent us from giving a detailed description on usage
of the BitCom language.  What follows is information which summarizes the
various elements of the language.  Please refer to your manual for a more
complete tutorial with descriptive examples.

@3Constants:@1
Constants may be integer numbers in the range -32768 to +32767, strings in
double quotes ("), strings in single quotes('), or strings in no quotes
(i.e. "abc" = abc).@
		       @4BitCom -- Communications System@1
			   @3SCRIPT/ACTION FILE HELP@1

@3D-Strings@1
Strings in double quotes are used to specify character strings for
assignment, compares, or to be sent to the host.  If a variable is found
in a string (a variable always begins with an @@) then the variable will
be replaced with its current value.  If it has no value, it will be
replaced with the null string.	D-Strings may also contain hexadecimal
character definitions, which begin with a $ (i.e. $0D is a carriage
return).

@3S-Strings@1
Strings in single quotes suppress any translation of variables.  This is
handy for assigning values to function keys.

@3Other Strings@1
A sequence of characters beginning with an alphabetic character and ending
with a blank or special character will be interpreted as an S-String if
it is not a 'keyword' or 'function name'.@
		       @4BitCom -- Communications System@1
			   @3SCRIPT/ACTION FILE HELP@1

@3Variables:@1
A very powerful concept in the BitCom language allows many different types
of variables.  Scratch variables are named @@a-@@z.  Argument variables
are the values of any arguments given when the current file was invoked,
and are named @@1-@@9.	Key variables may be used to set key functions, or
to send the value of a key to the host (e.g. @@return gives the same
result as if you had pressed the ÄÙ key).  Builtin system variables allow
you to set and query current BitCom communications settings.

@3Valid Key Variables:@1
______@@F1________@@Home______@@Alt-A_____@@Ctl-A_____@@Alt-F1
______@@F2________@@End_______@@Alt-B_____@@Ctl-B_____@@Alt-F2
______@@F3________@@PgUp______@@Alt-C_____@@Ctl-C_____@@Alt-F3
______@@F4________@@PgDn______@@Alt-D_____@@Ctl-D_____@@Alt-F4
______@@F5________@@Del_______@@Alt-E_____@@Ctl-E_____@@Alt-F5
______@@F6________@@Ins_______@@Alt-F_____@@Ctl-F_____@@Alt-F6
______@@F7________@@Esc_______@@Alt-G_____@@Ctl-G_____@@Alt-F7
______@@F8________@@LfArr_____@@Alt-H_____@@Ctl-H_____@@Alt-F8
______@@F9________@@RiArr_____@@Alt-I_____@@Ctl-I_____@@Alt-F9@
		       @4BitCom -- Communications System@1
			   @3SCRIPT/ACTION FILE HELP@1

@3Valid Key Variables (continued):@1
______@@F10_______@@DnArr_____@@Alt-J_____@@Ctl-J_____@@Alt-F10
______@@Sft-F1____@@UpArr_____@@Alt-K_____@@Ctl-K_____@@Ctl-F1
______@@Sft-F2____@@Ltab______@@Alt-L_____@@Ctl-L_____@@Ctl-F2
______@@Sft-F3____@@Rtab______@@Alt-M_____@@Ctl-M_____@@Ctl-F3
______@@Sft-F4____@@NL-0______@@Alt-N_____@@Ctl-N_____@@Ctl-F4
______@@Sft-F5____@@NL-1______@@Alt-O_____@@Ctl-O_____@@Ctl-F5
______@@Sft-F6____@@NL-2______@@Alt-P_____@@Ctl-P_____@@Ctl-F6
______@@Sft-F7____@@NL-3______@@Alt-Q_____@@Ctl-Q_____@@Ctl-F7
______@@Sft-F8____@@NL-4______@@Alt-R_____@@Ctl-R_____@@Ctl-F8
______@@Sft-F9____@@NL-5______@@Alt-S_____@@Ctl-S_____@@Ctl-F9
______@@Sft-F10___@@NL-6______@@Alt-T_____@@Ctl-T_____@@Ctl-F10
______@@Break_____@@NL-7______@@Alt-U_____@@Ctl-U_____@@CtlHome
______@@BS________@@NL-8______@@Alt-V_____@@Ctl-V_____@@CtlEnd
______@@Return____@@NL-9______@@Alt-W_____@@Ctl-W_____@@CtlPgUp
______@@Ctlret____@@NL-Dot____@@Alt-X_____@@Ctl-X_____@@CtlPgDn
______@@Ctlprt____@@NL-Dsh____@@Alt-Y_____@@Ctl-Y_____@@CtlLeft
_________________@@NL-Pls____@@Alt-Z_____@@Ctl-Z_____@@CtlRght@
		       @4BitCom -- Communications System@1
			   @3SCRIPT/ACTION FILE HELP@1

The valid builtin variables are:

@3Builtin Name___Type____________Description_____________________________________@1
____@@Autofil___String__________Name of automatic logon file
____@@Autolf____Number__________Auto linefeed filter, =0 off, =1 on
____@@Baud______Number__________Current baud rate
____@@Bell______Number__________Current bell setting (valid = 0 - 3)
____@@Blankln___Number__________Blank line filter, =0 off, =1 on
____@@Breakt____Number__________Number of hsecs break should last
____@@Capmode___Number__________Capture mode, =0 Replace, =1 Append
____@@Capname___String__________Name of capture file
____@@Cdate_____String__________Current date in format "mm/dd/yy"
____@@Col_______Number__________Current cursor column position
____@@Conn______Number__________=0 if not connected, =1 if connected, =2
_______________________________if dialed line is busy
____@@Crec______Number__________Current record number
____@@Csend_____Number__________Character delay, -1 wait for echo, 0 none,
_______________________________or number of hsecs to wait
____@@Ctime_____String__________Current time in format "hh:mm am|pm"@
		       @4BitCom -- Communications System@1
			   @3SCRIPT/ACTION FILE HELP@1

@3Builtin Vars___Type____________Description_____________________________________@1
____@@Data______Number__________Number of data bits
____@@Desc______String__________Current record description.
____@@Echo______Number__________=0 No echo, =1 Echo on
____@@Emulate___String__________Emulation file name, or "None"
____@@Exptab____Number__________Expand tabs filter, =0 off, =1 on
____@@Input_____Number__________Input filter, =0 off, =1 on
____@@Ldate_____String__________Last connect date in format "mm/dd/yy"
____@@Lsend_____Number__________Line delay, -2 manual, -1 wait for LF,
_______________________________0 none, or number of hsecs to wait
____@@Ltime_____String__________Last connect time in format "hh:mm am|pm"
____@@Mcol______Number__________Maximum number of columns in display screen
____@@Mode______Number__________=0 Answer, =1 Dial
____@@Mrow______Number__________Maximum number of rows in display screen
____@@Note1_____String__________First line of notes
____@@Note2_____String__________Second line of notes
____@@Output____Number__________Output filter, =0 off, =1 on@
		       @4BitCom -- Communications System@1
			   @3SCRIPT/ACTION FILE HELP@1

@3Builtin Vars___Type____________Description_____________________________________@1
____@@Parity____String__________"N" None, "E" Even, "O" Odd, "M" Mark, "S" Space
____@@Phone_____String__________Current phone number.
____@@Recid_____String__________Current record id.
____@@Redial____Number__________Number of seconds between re-dials
____@@Row_______Number__________Current cursor row position
____@@Stop______Number__________Number of stop bits
____@@Trace_____Number__________=0 Trace off, =1 Hex, =2 Ascii
____@@Upcase____Number__________Upper case filter, =0 off, =1 on @
		       @4BitCom -- Communications System@1
			   @3SCRIPT/ACTION FILE HELP@1

@3Statements:@1
A statement can either be a variable statement, an assignment statement, a
procedure invocation, or a control statement.  Statements may be separated
with a semicolon (;) to get more than one statement on a line.

@3Variable Statements:@1
A variable statement consists of one of the following:

   1.  The name of a variable (e.g. @@1 or @@a)
   2.  A constant string or numeric value
   3.  The name of a key variable

For cases 1.  and 2., the resulting string of the variable or constant is
SENT to communications port as though you had typed the string at the
keyboard.  If the variable contained a numeric value, the string
representing the number is sent (i.e.  200 = "200").@
		       @4BitCom -- Communications System@1
			   @3SCRIPT/ACTION FILE HELP@1

@3Variable Statements (continued):@1
If the name of a key variable (case 3.) is given, if an ACTION string has
been assigned to that key then the action will be done.  Otherwise the
value of the key will be sent to the communications port as though you had
pressed that key at the keyboard.  Note however that the special keys
(e.g.  Help, Confirm, etc.) cannot be invoked this way.

@3Assignment Statement:@1
The assignment statement looks as follows:
	variable = value ;
The variable may be any valid @@ variable described previously.  The value
may be either a Number, d-string, s-string, other variable name, or
function name.

@3Control Statements:@1
Control statements are used to control the flow through the command file.
They provide for conditional testing and branching.  There is also a
statement to invoke another command file.@
		       @4BitCom -- Communications System@1
			   @3SCRIPT/ACTION FILE HELP@1

@3Labels:@1
A label consists of a line which begins with a colon (:) followed
immediately with a label name.	The label must be the first token on the
line (i.e.  it may be preceded with blanks but not another token).

Only the first 8 characters of a label name are used, although the name
may be longer.	The label may be followed by any statement.

@3IF Statement:@1
The conditional statement looks like:
	IF ( condition ) statements
The condition is tested and if it is true, the statements on the remainder
of the line are executed.  Otherwise, the statements are skipped.  A
condition consists of compare operators, with AND and OR operators.
Parentheses may be used to control the order of comparison.

The comparison operators are:
    =	 - equal	    >	 - greater than      >=   - greater or equal
    <>	 - not equal	    <	 - less than	     <=   - less or equal@
		       @4BitCom -- Communications System@1
			   @3SCRIPT/ACTION FILE HELP@1

@3Branching Statements:@1
Several special statements are provided to control the order statements in
the command file are invoked.

EXIT message;

If this statement is encountered, all processing of the command file is
stopped and a return is made to the next highest level.  The given message
is shown on the current screen.  The message argument is optional.

CANCEL message;

If this statement is encountered, all processing of all command files is
stopped and a return is made to the keyboard state.  The given message is
shown on the current screen.  The message argument is optional.

GOTO label;

This causes processing to begin at the line with the given label name.@
		       @4BitCom -- Communications System@1
			   @3SCRIPT/ACTION FILE HELP@1

@3INVOKE Statement:@1
You may begin execution in another command file with the Invoke statement,
which looks like:

	INVOKE filename [arg1 ... arg9];

This begins processing the given filename.  When the end of file is
reached or an EXIT statement is encountered in that file, execution will
continue in the current file at the statement following the INVOKE
statement.  INVOKEs may be nested up to 8 levels.  If no extension is
given for the filename, the extension .ACT is assumed.

After the filename, you may give up to 9 arguments to the file.  These
arguments may be referenced in the invoked file as variables @@1 through
@@9.  The argument may be a string, number, or variable.@
		       @4BitCom -- Communications System@1
			   @3SCRIPT/ACTION FILE HELP@1

@3Functions:@1
There are many BitCom functions which may be invoked to perform a variety
of tasks.  These functions are invoked by giving the function name plus
any required arguments enclosed in left and right parenthesis and
separated by commas.  The functions always return a value which is either
the result of the function or a return code indicating the success or
failure of the task.  You may choose to ignore the function result by not
assigning it to anything.

@3Connection Functions:@1
@4select(recid)@1
This function "select"s the given recid (the 8-character name given when
you define communications parameters).	By selecting the record, you are
merely making it the "current record".  You may then query or change any
of the record values using the builtin variables. Always returns 0.

@4docomm@1
This function begins communications, using the current value of @@Mode.
The function always returns 0 immediately.@
		       @4BitCom -- Communications System@1
			   @3SCRIPT/ACTION FILE HELP@1

@3Port Input-Output Functions:@1
@4getch@1
This routine reads a character from the port.  If none is available, it
returns -1.  Otherwise it returns the character read.

@4getchw@1
Like getch, but waits for next character if none is currently available.

@4hangup@1
This function transmits the hangup string.  It returns 0 normally, -1 if
the currently defined hangup string (@@hangup) is null.

@4sendfile(filename, mode)@1
This function initiates a file send.  The argument "filename" is a
variable or constant string with the name of the file to send.	"mode"
must be the string "xmodem" or "ascii" and defines the method used to send
the file.  This function returns 0 after file is sent, or -1 if the
sendfile was not found.@
		       @4BitCom -- Communications System@1
			   @3SCRIPT/ACTION FILE HELP@1

@3Port Input-Output Functions (continued):@1
@4recvfile(filename, mode [,eof])@1
Just like 'sendfile' but the file is received.  If the mode is "ascii",
you may also give the string which will be taken to mean the 'end-of-file'
has been reached.  If you omit this argument, the character Ctl-Z (Hex 1A)
will be taken as end-of-file.

@3Display I/O Functions@1
@4type(string)@1
This function types the given string at the display.  No carriage return
is done after the string.  Function always returns 0.

@4typecr(string)@1
This function also types the given string, but ends the string with a
carriage return.  Function always returns 0.

@4bell@1
This function rings the current alarm (depending on current @@Bell
setting).  Function always returns 0. @
		       @4BitCom -- Communications System@1
			   @3SCRIPT/ACTION FILE HELP@1

@3Display I/O Functions (continued):@1
@4prompt(string)@1
This function types the given string (with no carriage return), and reads
from the keyboard until the carriage return key is pressed.  The string
typed will be returned.

@4message(string)@1
This function displays the given string in the message-area (bottom right
corner) of the string.	Function always returns 0.

@4poscur(col, row)@1
This function sets the current column and row of the cursor.  Return is
always 0.

@4clear@1
This function clears the display screen.  Return is always 0.@
		       @4BitCom -- Communications System@1
			   @3SCRIPT/ACTION FILE HELP@1

@3Event Wait Functions@1
@4wait(hour, min)@1
Wait until given hour and min occurs.  Hour must be given in 24 hour format.
The wait will occur until the next occurrence of given time.  Always returns 0.

@4cwait(string)@1
Wait for given string to be received on the communications line.  String may be
1 character long to wait for a single character.  To wait for a line feed /
carriage return combination, give the string "$0D$0A".  Always returns 0.

@4wwait(time)@1
Wait until no characters are received on the communications line for 'time'
seconds.  Returns the last word received (i.e. the last string surrounded by
one or more blanks, tabs, or control characters).

@4twait(time, unit)@1
Waits for the given amount of time, depending on the value of 'unit'.
Unit may be "hsec" (hundredths of seconds), "sec" (seconds), "min"
(minutes), or "hour" (hours).  Always returns 0.@
		       @4BitCom -- Communications System@1
			   @3SCRIPT/ACTION FILE HELP@1

@3Miscellaneous Functions@1
@4expr(expression)@1
This function evaluates the given expression and returns the value.  The
expression consists of constants, variables, or function calls separated
by operators.  Valid operators are '+' for addition, '-' for subtraction,
'*' for multiply, and '/' for divide.  Parentheses control calculation order.

@4substr(string, start [,len])@1
Returns a sub-string of the given string, starting at character @3start@1 (where
1 is the first character).  The string will be @3len@1 characters long. If len
is omitted, the sub-string will be from 'start' till the end of 'string'.

@4dos(string)@1
This function issues the command as a DOS command.  Return is always 0.

@4trace(n)@1
This function enables/disables tracing of the running ACTION/SCRIPT file.
trace(0) disables tracing (the default value).	trace(1) begins tracing.
Return is always 0.
@.
