                       EleBBS (Questionnaire) Script Language
       ===================================================================
         
       The original questionnaire script language was created in 1986
       for QuickBBS by Adam Hudson, and was later rewritten and improved
       during the early 1990's for RemoteAccess BBS by Andrew Milner.
       Other variations were created for SuperBBS, ProBoard, EzyCom,
       and Concord BBS's.

       The EleBBS script language is 100% compatible with RemoteAccess's
       version of the questionnaire script language, yet adds many more
       commands and features, thus making it considerably more powerful.

       The name "questionnaire" refers to the original versions which
       only were able to ask questions, record the answers, and change
       the users security level based on their answers. The EleBBS script
       language goes far beyond that, allowing applications and utilities
       to be created.

       Questionnaire script files always have the extension .Q-A.  Each
       script is a plain text file, and contains one command per line.
       The available commands are listed below. Note that the command
       interpreter is not case-sensitive, so the command "Ask" could be 
       entered as either "ASK" or "ask".



       How to run a Script:
       ====================
       Scripts are usually executed from a menu, using the menu Type-12
       (execute a questionnaire) command with the name of the script in
       the OptData field of the menu. The path and extension should not
       be included.

       Scripts may also be executed from any prompt in the language file,
       or from any external text file, by using the following code:
           ^K@FILENAME|
       Please note that ^K means control-K, not the letters ^ and K.
       To enter a control code into the language editor, you must first
       press control-P before pressing the actual control code. The
       filename goes after the @ character, and is followed by a |.
       This example would execute filename.q-a if it exists in the
       Q-A directory that is defined for the current language file.



       Auto-Running Scripts:
       =====================
       The following script filenames are automatically executed by EleBBS
       under certain conditions, if they exist:
       
       DOBCFAIL.Q-A   Runs when the "Date of Birth" security check fails.
       NEWUSER.Q-A    Runs the first time a new user calls the BBS.
       NOCREDIT.Q-A   Runs when the users credit balance reaches zero.
       SUBDATE.Q-A    Runs when the users subscription date expires.
       SUBDAYnn.Q-A   Runs nn days before the users subscription expires.
                      (ie: SUBDAY10.Q-A is run 10 days before it expires)

       YESNO.Q-A      Replaces "Yes/No" prompts in the language file.
       EDITMNU.Q-A    Replaces (Abort), (Help), (Save), (Continue).
       MAILREAD.Q-A   Replaces Would you like to read this mail now?
       MSGBAR.Q-A     Replaces Next, Last, Again, Reply, Enter, Delete.
       READTYPE.Q-A   Replaces Forward, Reverse, New Msgs, Individual,
       RDSELECT.Q-A   Replaces From name, To name, Subject, Keywd in text.
       RDMSG.Q-A      Replaces the internal Message Header (to:, from:).
       RDMSGPS.Q-A    Replaces the internal Message Header (with pausing).

       DATEDIT.Q-A    Replaces the internal Date Entry Routine.
       FA-CHNG.Q-A    Replaces the internal File Area Changer.
       FG-CHNG.Q-A    Replaces the internal File Group Changer.
       MA-CHNG.Q-A    Replaces the internal Message Area Changer.
       MG-CHNG.Q-A    Replaces the internal Message Group Changer.
       COMBINED.Q-A   Replaces the internal Combined Msg Areas Selector.
       LASTCALL.Q-A   Replaces the internal Last Callers Lister.
       WHONLINE.Q-A   Replaces the internal Who's Online Lister.

       EDITFTR.Q-A    Message Editor Footer Script.  (required)
       EDITHDR.Q-A    Message Editor Header Script.  (required)
       EDITHLP.Q-A    Message Editor Help Script.    (required)
       EDITMNU.Q-A    Message Editor Menu Script.    (required)
       EDITQTO.Q-A    Message Editor Quote Script.   (required)


       The EDIT*.Q-A scripts are only required if you enable the internal
       message editor in EleBBS. All the other .Q-A Scripts are optional,
       and if they do not exist then EleBBS will use its regular method
       of handling the task internally.



       FDB HTML Scripts
       ================
       FDBHTML*.Q-A   Used by "ELEFILE HTMLIST". (Not used by EleBBS).

       The FDBHTML*.Q-A files are used by ELEFILE.EXE to make HTML
       listings of the FDB (File DataBase), and can create both file area
       listings as well as newfile listings. These .Q-A files are only
       looked for by ELEFILE in the *current* directory, rather then in
       the normal Q-A directory that EleBBS uses.

       The "Display" command sends all output to the specified HTML file,
       rather to the screen. Several special @MACROS are only used by
       these scripts. Multiple FDBHTML* files can be used to create
       frames, for example FDBHTMLA.Q-A FDBHTMLB.Q-A and FDBHTMLC.Q-A
       could each create a seperate part of the frame. ELEFILE will
       process all the FDBHTML*.Q-A files that it finds in the current
       directory, and each one can create it's own HTML files.

       See the sample FDBHTML0.Q-A file included in EXCFG.ZIP for a
       list of @MACROS supported and how they can be used.

       High-Ascii characters in the file descriptions can be remapped to
       whatever characters you perfer in the HTML files, by having a file
       called CHARMAP.CTL in the current directory. See the example
       CHARMAP.CTL in EXCFG.ZIP for more information.


       Script Command Listing
       ===================================================================
       All the script commands which are supported by EleBBS are described
       in this section.  Each command name is listed along with the proper
       syntax, a description, and one or more examples of its usage.



          Ask                                                     (RA/ELE)
          
          Syntax:       Ask <length> <var num>

          Description:  Allows the user to enter a string of characters.
                        Up to <length> characters can be entered, which
                        can be a number from 1 to 255.
                        The string of characters the user enters are
                        stored in the defined variable number.                        

                        
          Example:      Ask 60 1

                        Allows the user to enter a string of up to 60
                        characters in length. This string is then stored
                        in variable number 1.



          Ascii                                                      (ELE)
          
          Syntax:       Ascii <var num> <value>

          Description:  Stores the character with the ASCII value into the
                        defined variable number.

          Example:      Ascii 1 178

                        This puts the character with ASCII value 178
                        into variable number 1.



          Assign                                                  (RA/ELE)
          
          Syntax:       Assign [%]<var num> <text> | <#var num | @var num>
 
          Description:  Assigns a text string to a variable.
                        A text string can contain spaces, but any trailing
                        spaces after the last word will be removed. If the
                        text is all numeric digits, then it can also be
                        interpreted as a value amount.

                        This command can also be used to copy the contents
                        of one <var num> to another, either directly by
                        using the "#" symbol in front of the <var num> you
                        want to copy from, or indexed by using the "%"
                        symbol on front of an index variable number.

                        Indexing is done by reading the value of the index
                        variable number, and that number becomes the
                        variable number to read the final result from.

          Example:      Assign 1 Hello World!
                        Display "|Variable number 1 is: " 1

                        This assigns "Hello World!" to variable number one
                        and sends "Variable number 1 is: Hello World!" to
                        the display.

          Example:      Assign 1 Apple
                        Assign 2 #1
                        Display "|Variable number 2 is: " 2

                        This assigns "Apple" to variable number 1,
                        copies variable number 1 to variable number 2,
                        and sends "Variable number 2 is: Apple" to the
                        display.

          Example:      Assign 1 5
                        Assign 5 Five
                        Assign 2 %1
                        Display "|Variable number 2 is: " 2

                        This assigns "5" to variable number one, assigns
                        "Five" to variable number five.
                        It then looks up the variable number stored in
                        the index (variable number 1), and since this is 5
                        it then reads variable number 5 to get the result,
                        which is copied to variable number 2. It finally
                        sends "Variable number 2 is: five" to the display.


          Example:      Assign 1 ^KO
                        If 1~ < 10
                        Display "You have less then 10 minutes remaining."
                        EndIf

                        This will assign the number of minutes remaining
                        to variable number 1, and if it is less then 10 it
                        will display the message.



          Break                                                      (ELE)
          
          Syntax:       Break

          Description:  Ends a While-Do loop before it's finished.
                        The Break command can only be used between
                        the While-do and EndWhile commands. 

          Example:      While 1 < 100 do
                          {whatever stuff here}
                          If 10 = 0
                            Break
                          EndIf
                        EndWhile



          Capitalise                                              (RA/ELE)
          
          Syntax:       Capitalise <ON | OFF>

          Description:  Turns on or off forced input capitalization. This
                        allows you to force any following "ask" statements
                        to set the users input to all upper or lower-case
                        letters.
                        This Capitalise setting will stay effective in the
                        script until another Capitalise command is
                        encountered.

          Example:      Capitalise ON


                        Forces all following "ask" statements to set the
                        users input to capital letters until a
                        "Capitalise OFF"  statement is encountered.




          Calc                                                       (ELE)
          
          Syntax:       Calc <var num> <var num> <operator> <var num>

          Description:  This performs a mathematical calculation and
                        stores the result into the first variable.

                        The operators supported are: <+> <-> <*> </> <%>
                        which are called add, subtract, multiply, divide,
                        and mod.  Mod is used to get the remainder after
                        a divide (modulo).

          Example:      Calc 1 2 + 3

                        This will add the value of variable number 2 with
                        the value of variable number 3 and stores that
                        result into variable number 1.

          Example:      Calc 1 2 / 3

                        This will divide the value of variable number 2 by
                        the value of variable number 3.  If the result is
                        a non-integer value, the decimal point and any
                        numbers to the right of it will be removed (so it
                        becomes an integer). The result is stored in
                        variable number 1.



          Cfg_File****                                               (ELE)
          
          Syntax:       Cfg_FileOpen  <file num> <filename> <filetype>
                        Cfg_FileRead  <file num>
                        Cfg_FileWrite <file num>
                        Cfg_FileSeek  <file num> <#var num | position>
                        Cfg_GetInfo   <file num> <field-num> #<var num>
                        Cfg_SetInfo   <file num> <field-num> #<var num>
                        Cfg_FileError <file num> <#var num>
                        Cfg_FileClose <file num>

         Description:   These functions allow a script to access virtually
                        all of the EleBBS config files and data files,
                        and can also write changes to these files. These
                        are very powerful commands which could destroy
                        your user/file/message databases if they are used
                        improperly!
                                               
                        <filename> can include the full path to the
                        filename, but if no path is given then EleBBS will
                        look for this file using the normal searching
                        methods.

                        <filetype> can be any of the following file types:

                        LIMITS, LANGUAGE, LASTCALL, FDBHDR, FDBIDX,
                        USERSBBS, USERSIDX, SYSINFO, MENU, EVENTS,
                        MESSAGES, MESSAGESELE, GROUP, FILES, FILESELE,
                        MODEM, CONFIG, CONFIGELE, PROTOCOL, TELNET,
                        LIGHTBAR, NEWSSERVER, NEWSGROUP, USERONBBS.

                        The field-numbers can be counted by looking at
                        the corresponding EleBBS Structure file. Or you
                        can use a small script to display each record
                        along with its number.

          Example:      ; Open the file
                        Cfg_FileOpen 1 c:\ele\config.ra CONFIG
                        ; Read the contents
                        Cfg_FileRead 1
                        ; Get fieldnumber 43
                        Cfg_FileGetInfo 1 43 1
                        ; Display it to the user
                        Display "Systemname = " 1
                        ; Change it
                        Assign 1 "The New Improved BBS Name"
                        ; Set the changes back into the record
                        Cfg_FileSetInfo 1 43 1
                        ; Return to the beginning of this file
                        Cfg_FileSeek 1 0
                        ; Write the changes back
                        Cfg_FileWrite 1
                        ; Close the file. Please note that the changes are
                        ; not applied until the file is re-read. For CONFIG
                        ; this means that changes won't be made effective
                        ; until EleBBS restarts.
                        Cfg_FileClose 1

                                                                                                                    whole number (integer), and is stored in <varnum1>.

          ChangeColor                                             (RA/ELE)
          
          Syntax:       ChangeColor <foreground> <background>

          Description:  Sets the color of all future characters sent to
                        the display until a color change command or code
                        is encountered, or until the end of the script
                        is reached. Standard decimal codes are used. If
                        the user does not have ANSI/AVT graphics enabled
                        then this command is ignored. See color code chart
                        under Display command for decimal color codes.

          Example:      ChangeColor 15 0

                        Changes the text color to a white foreground on
                        a black background until another color change
                        statement or code is encountered.



          ClearScreen                                             (RA/ELE)
          
          Syntax:       ClearScreen

          Description:  Clears the display if the user has their
                        screen clearing codes enabled.  Otherwise,
                        this command is ignored.

          Example:      ClearScreen

                        This would clear display screen.



          ConCat                                                     (ELE)
          
          Syntax:       ConCat <result var num> <var num> <var num>

          Description:  Concatenates (combines) 2 variables, and stores
                        the results into another variable. If the total
                        length of the combination is over 255 characters
                        then it is truncated after character 255.

          Example:      Assign 2 Ele
                        Assign 3 BBS
                        Concat 1 2 3
                        Display 1

                        This will display "EleBBS"



          Commit                                                  (RA/ELE)
          
          Syntax:       Commit

          Description:  Usually, all responses are stored in a queue and
                        are written to disk when the questionnaire
                        terminates. The COMMIT command forces the queue
                        to be written to disk immediately.

          Example:      Commit

                        This will cause all responses stored in the queue
                        to be written to disk immediately.



          Cursor                                                     (ELE)
          
          Syntax:       Cursor <x-pos> <y-pos>

          Description:  Moves the cursor to the Horizontal and Vertical
                        positions defined. It is similar to using both the
                        SetX and SetY functions. Variables can NOT be used
                        with this command.

          Example:      Cursor 79 22

                        This places the cursor at position 79 22



          Dec                                                        (ELE)
          
          Syntax:       Dec <var num>

          Description:  Decreases the variable value by one.

          Example:      Dec 1

                        Will subtract one from the value of variable 1.



          Define_HTML                                            (ELEFILE)
          
          Syntax:       Define_HTML <filename>

          Description:  This is only supported by ELEFILE.EXE.
                        It can NOT be used from EleBBS itself.
                        Used to define which HTML file all further output
                        in this script will be redirected to, which is
                        processed during an "ELEFILE HTMLIST" command.

          Example:      Define_HTML c:\html\new%DAYSOLD.html



          DefineOutput                                            (RA/ELE)
          
          Syntax:       DefineOutput <filename>

          Description:  Usually, the users responses to the questionnaire
                        are written to a file called filename.ASW (where
                        filename is the name of the .Q-A script that is
                        being executed. This command allows the script to
                        specify a different name for the output file.

          Example:      DefineOutput C:\BBS\ANSWERS.TXT

                        This would cause all user responses to be
                        stored in the file C:\BBS\ANSWERS.TXT.



          Delay                                                      (ELE)
          
          Syntax:       Delay <milliseconds>

          Description:  Delays the system for <milliseconds> milliseconds.
                        1000 milliseconds is one second.

          Example:      Delay 1000

                        This will delay the system for one second.



          DeleteMsg                                                  (ELE)
          
          Syntax:       DeleteMsg <AreaNr> <MsgNr> <YES | NO>

          Description:  Deletes a message from the specified message base.
                        The first two parameters may either be a value,
                        or can be a <#var num>.
                        The third parameter can be either YES or NO, and
                        sets whether Elebbs should check if the user has
                        access to delete that message. If YES is specified
                        then the message is only deleted if the user has
                        access to delete it.

                        Assign 1 5
                        Assign 2 100
          Example:      DeleteMsg #1 #2 YES

                        This will delete message number 100 from message
                        area number 5, if the current user has proper
                        access to delete to that particular message.



          Delimit                                                    (ELE)
          
          Syntax:       Delimit <var num> <value> [<space>] or [<zero>]
                                                  [<front>] or [<back>]
                                                  [<yes>]  or  [<no>]

          Description:  Shortens the length of a variable to the defined
                        number of characters, if the variable is currently
                        longer then this value.
                        This can be identical to using the function
                        "Substring <varnum> <varnum> 1 <value>"

                        You can also optionally pad a variable with spaces
                        or zeros to force it to a fixed length. The <back>
                        mode is assumed by default, so the padding is done
                        to the left of the existing characters. You can
                        specify <front> to pad in front of the existing
                        characters instead if desired.

                        Color codes can be either counted or ignored by
                        specifying <yes> or <no> as the last parameter.


          Example:      Assign 1 EleBBS
                        Delimit 1 3
                       
                        This will shorten variable 1 from 6 to 3
                        characters, changing it to "Ele".

          Example:      Assign 1 EleBBS
                        Delimit 1 10 space

                        This will lengthen the size of variable number 1
                        from 6 characters to 10 Characters, changing it
                        to "EleBBS    ".

          Example:      Assign 1 EleBBS
                        Delimit 1 10 space front

                        This will lengthen the size of variable number 1
                        from 6 characters to 10 Characters, changing it to
                        "    EleBBS".



          Display                                                 (RA/ELE)
          
          Syntax:       Display [<text>] [<var num>]

          Description:  Unlike the Display function in RemoteAccess,
                        this will allow you to display either text, a
                        variable, or even both. Any pipe symbols "|"
                        are converted to carriage returns.

                        You can display any of the Ctrl-A through Ctrl-X
                        control codes listed here, as well as several
                        special EleCodes that begin with the ` character:

                        Control
                        Code    System Function Performed
                        
                        ^A      Waits for any key to be pressed.
                        ^B      Disable aborting display with the S key.
                        ^C      Enable aborting display with the S key.
                        ^D      Enable the Continue? prompt (turns on
                                page pausing).
                        ^E      Disable the Continue? prompt (turns off
                                page pausing).
                        ^F      User parameter (see MACROS.TXT).
                        ^G      Produce a beep on the caller's console.
                        ^H      Backspace. Moves cursor one space back.
                        ^I      Tab. Moves cursor forward 8 spaces.
                        ^J      Linefeed. Moves cursor down one line.
                        ^K      System parameter (see MACROS.TXT).
                        ^L      Clears the display if the users clear
                                screen setting is enabled.
                        ^M      Carriage return. Moves cursor to far left.
                        ^V      Reserved for AVATAR.
                        ^W      Pause for one second.
                        ^X      Execute a program in a command shell.
                                The ^X is followed by the command line you
                                want to execute, and is terminated by a |
                                (pipe) character. This can be disabled in
                                ELCONFIG. (see EXEC command for macros).
                        ^Z      "End Of File" marker.  (Don't use this).

                        EleCode  Function Performed
                        

                        `Fc:    Set the foreground color to the value 'c'.
                        `Bc:    Set the background color to the value 'c'.
                                Foreground color values can be  0 to 15.
                                Background color values can be 0 to 7.
                                Example: `F1:`B2: sets forgrnd=1, bkgrnd=2
                        `Acc:   Sets both background & foreground colors.
                                This is a bit tricky to use, as 'cc' is a
                                decimal value, determined by the equation:
                                cc=
                                (bkground color x 16) + foreground color.
                                You can activate the "blinking text" mode
                                by adding 128 to this value.
                        `Gx,y:  Move cursor to screen location 'x,y'
                                example: `G70,23:  goes to x=70, y=23
                        `Da,b:  Duplicate ascii character 'b', 'a' times
                                Example: `D32,10:  displays 10 spaces.
                        `Xx:    Sets cursor to horizontal position 'x',
                                which can be a vaule from 1 to 80.
                        `Yy:    Sets cursor to vertical position 'y',
                                which can be a value from 1 to the length
                                of the users display.
                        `X+n:   Moves cursor 'n' positions to the right.
                        `X-n:   Moves cursor 'n' positions to the left.
                        `Y+n:   Moves cursor 'n' positions down.
                        `Y-n:   Moves cursor 'n' positions up.
                                * Cursor moves stop at edges of screen. 
                        `S:     Clear display (regardless of user setting)

                        Colors can also be set using the ^K[cc macro, in
                        which cc = a pair of Hexadecimal digits, the first
                        digit is the background color code, and the second
                        digit is the foreground color code.

                        Standard Color Codes
                        

                        Background                Flashing
                        Colors         Standard   Forground (Hex)
                        -----------------------------------------
                        Black            0          8
                        Blue             1          9
                        Green            2          A
                        Cyan             3          B
                        Red              4          C
                        Purple           5          D
                        Brown            6          E
                        Grey             7          F


                        Foreground     Decimal    Hexadecimal
                        Colors         Numbers    Numbers  
                        -----------------------------------------
                        Black            0          0
                        Blue             1          1
                        Green            2          2
                        Cyan             3          3
                        Red              4          4
                        Purple           5          5
                        Brown            6          6
                        Gray             7          7
                        Dark Gray        8          8
                        Bright Blue      9          9
                        Bright Green     10         A
                        Bright Cyan      11         B
                        Bright Red       12         C
                        Bright Purple    13         D
                        Yellow           14         E
                        White            15         F



          Example:      Display "`F15:Hello|"

                        This will set the forground color to white (15)
                        and displays "Hello" and a carriage return.
                        

          Example:      Display 1

                        This will display the contents of variable 1.

          Example:      Display "The result is " 1
          
                        This will display both the text and the
                        contents of variable 1.


                       
          DisplayLocal                                               (ELE)
          
          Syntax:       DisplayLocal [<text>] [<var num>]

          Description:  This is similar to the Display command, but it
                        will only display the text on the local side.
                        The sysop will see the text, but not the user.

          Example:      DisplayLocal "Hello|"

                        This will display the text "Hello" followed
                        by a carriage return to the sysops screen only.
                       
                        All the same macros and codes are supported as
                        in the "Display" command.


          DisplayFile                                             (RA/ELE)
          
          Syntax:       DisplayFile <text filename>

          Description:  Displays a text file on the display. The text
                        file must be located in the text file directory,
                        and the file's extension (.ASC/.ANS/.AVT/.RIP)
                        is automatically determined according to the users
                        mode settings, in the same way menu type-5 works.
                        The <text filename> used must not include any
                        extension, as this will automatically be found.

          Example:      DisplayFile WELCOME

                        This displays the file WELCOME.A?? from the
                        text files directory.


          DoContinue                                                 (ELE)
          
          Syntax:       DoContinue <var num>

          Description:  Sets <var num> to YES or NO depending on the
                        last choice the user selected on a "Continue?"
                        (same as "More? Y/N/=") language prompt.


          Example:      DoContinue 1

                        This will set variable number 1 to YES if the
                        user selected YES to the last Continue prompt.



          EmulateInput                                               (ELE)
          
          Syntax:       EmulateInput <string>

          Description:  Pushes one or more keys into the users input
                        buffer.  Here after, EleBBS treats them as if
                        they were actually pressed by the user. The ';'
                        character is converted to a carriage return.

          Example:      Emulateinput F

                        Places an 'F' into the users input buffer.



          EmulateSys                                                 (ELE)
          
          Syntax:       EmulateSys <string>
                               
                        Similar to the Emulate input command.
                        Pushes one or more keys into the sysops input
                        buffer. Here after, EleBBS treats them as if
                        they were actually pressed by the user. The ';'
                        character is converted to a carriage return.

          Example:      EmulateSys X

                        Places an 'X' into the sysops input buffer.
                               


          EmulateVar                                                 (ELE)
          
          Syntax:       EmulateVar <var num>

          Description:  Similar to the EmulateInput command. Pushes one
                        or more keys (contained in the variable) into the
                        users input buffer. Here after, EleBBS treats them
                        as if they were actually pressed by the user.

          Example:      EmulateVar 1

                        Places the contents of variable number 1 into the
                        users input buffer.



          EmulateSysVar                                              (ELE)
          
          Syntax:       EmulateSysVar <var num>

          Description:  Similar to the EmulateInput command. Pushes one
                        or more keys (contained in the variable) into the
                        sysops input buffer. Here after, EleBBS treats them
                        as if they were pressed by the sysop.

          Example:      EmulateVar 1

                        Places the contents of variable number 1 into the
                        sysops input buffer.



          EndIf                                                   (RA/ELE)
          
          Syntax:       EndIf

          Description:  Used in conjunction with the If command, this
                        signifies the end of an If condition. The function
                        of If and EndIf are explained under the If command.

          Example:      See the If script command.



          Exec
          
          Syntax:       Exec <command line>

          Description:  Executes an external program from a command prompt
                        in the same way that a menu function type 7 
                        (Run an external program in a shell) is performed.
                        All the command-line parameters that are valid in
                        a menu function type 7 can be used here as well.

                        Valid parameters are:
                        *A Writes users handle to DORINFO1.DEF drop file.
                        *B Passes the baud rate of the connection 0=local.
                        *C The path\filename of the command interpreter
                           i.e.: c:\windows\command.com
                        *F Users first name
                        *G Users ANSI settings: ON or OFF
                        *H Leave the fossil hot (DOS version only)
                        *L Users Last Name
                        *M Tells EleBBS to shell out of memory before
                           running (only used in DOS versions of EleBBS)
                        *N Node Number, as specified with the -N parameter
                           when ELEBBS.EXE was run.
                        *O Overrides the users baud rate with hardcoded
                           value, i.e.: *O19200
                        *P Communications (COM) port being used, 1-255.
                        *R Users Record number in the user file.
                        *S Generates a custom exit file. See RA.DOC.
                        *T Time Remaining in minutes for this call.
                        *U Passes a 10 char useron status. ie: *UDwnloading 
                        *V Avoids clearing the screen first, and does
                           not send a "wait... loading." prompt.
                        *X causes a TAGLIST.RA list of tagged files to be
                           written to the current (nodes) directory.
                        *Z Avoids running SFOS.BAT and UFOS.BAT before
                           and after the specified command line.
                        *! Stops the system timer for the duration of
                           the shell, so the users time is not reduced.
                        *# Turns the "Wants Chat" indicator off afterwards.
                        *0 The path to the currently selected file area.
                        *1 The path to the currently selected message area.


          Example:      Exec C:\BBS\FILEDOOR.EXE *R *P *N

                        This executes a command line which runs the
                        FILEDOOR.EXE program and passes it the users
                        record number (*P), the com port # (*P) and
                        the BBS node number (*N) to the program.

          Example:      Exec *C /c C:\BBS\BAT\TWARS.BAT *N

                        This executes a command line that runs a
                        batch file called TWARS.BAT, and also passes
                        it the BBS node number (*N) to the batch.
                        Under DOS and Win9x/ME, it is required to load
                        the command processor with the /c option in
                        order to run a batch file (*C /c). Under Windows
                        NT and Win2000 this is not required.


          FileExist                                                  (ELE)
          
          Syntax:       FileExist <var num> <[path]filename>

          Description:  Sets <var num> to either YES or NO depending on
                        whether the specified file exists or not.
                        A Variable can also be used for the filename.

          Example:      FileExist 1 c:\bbs\busy.sem

                        Places YES in variable number 1 if the file exists.

          Example:      Assign 2 c:\path\anyfile.txt
                        FileExist 1 #2

                        Places YES in variable number 1 if the file exists.


                       
          FileOpen                                                   (ELE)
          
          Syntax:       FileOpen <file number> <[path]filename>

          Description:  Opens file number <file number>. This needs to be
                        done before the file can be accessed using the
                        fileread and filewrite commands.

          Example:      FileOpen 1 c:\bbs\data.txt

                        Opens file number 1 for read/write access.



          FileRead                                                   (ELE)
          
          Syntax:       FileRead <file number> <var num>

          Description:  Reads one line of text from a currently open text
                        file.
          
          Example:      FileOpen 1 c:\bbs\data.txt
                        FileRead 1 100
                        FileRead 1 101

                        Reads the first line of text from the file into
                        variable number 100, and the second line of text
                        into variable 101.



          FileWrite                                                  (ELE)
          
          Syntax:       FileWrite <file number> <var num>

          Description:  Writes one line of text to the end of a
                        currently open text file.
          
          Example:      FileOpen 1 c:\bbs\data.txt
                        Assign 100 Here is a new line of text
                        FileWrite 1 100

                        Writes the text to the end of the file.



          FileClose                                                  (ELE)
          
          Syntax:       FileClose <file number>

          Description:  Closes a currently open file. All files
                        that are opened in a script should later
                        be closed.
          
          Example:      FileClose 1

                        Closes file number 1, so that other
                        programs can now access it.



          FileDelete                                                 (ELE)
          
          Syntax:       FileDelete <[path]file name>

          Description:  Deletes the specified file.
          
          Example:      FileDelete c:\path\tempfile.txt

                        Deletes the file from the hard drive.



          GetArrowKey                                                (ELE)
          
          Syntax:       GetArrowKey <var num>

          Description:  Waits for the user to press a key and returns the
                        key pressed in the defined variable. If one of the
                        arrow keys is pressed, then one of the words
                        "UP", "DOWN", "RIGHT" or "LEFT" is returned in the
                        variable according to the key pressed. The Ins and
                        Del keys will return "INSERT" and "DELETE". Any
                        alpha keys (a-z) are converted to upper case
                        automatically. The Enter key is converted to the
                        pipe symbol "|" to make it easy to check for.

          Example:      GetArrowKey 1

                        Gets the pressed key in variable number 1.



          GetBBSOS                                                   (ELE)
          
          Syntax:       GetBBSOS <var num>

          Description:  Writes the Operating System that this version of
                        EleBBS was compiled for to the defined variable.
                        Note that if you are running the DOS version of
                        EleBBS under OS/2 or Windows, it will still report
                        "DOS" as the OS version.

                        Current possibilities are "DOS", "OS/2", "WIN32",
                        and "Linux".

          Example:      GetBBSOS 1

                        This will put the name of the OS this EleBBS is
                        designed for into variable number 1.



          GetChoice                                               (RA/ELE)
          
          Syntax:       GetChoice <allowed keys> <var num>

          Description:  Waits for the user to enter one of the
                        characters in <allowed keys> and stores the
                        character in the variable <var num>.  The
                        character entered is not case-sensitive.

          Example:      GetChoice YN 1

                        This allows the user to press either the "Y" or
                        "N" key, and then stores the selection in variable
                        number 1.





          GetEnv                                                     (ELE)
          
          Syntax:       GetEnv <var num> <environment-var>

          Description:  Gets an Environment variable and places it into
                        the specified <var num>.

          Example:      GetEnv 1 ELEBBS


                        This gets the contents of environment variable
                        %ELEBBS% and stores it in variable number 1.



          GetGraph                                                   (ELE)
          
          Syntax:       GetGraph <var num>

          Description:  Writes a list of all the current graphic modes to
                        the variable so that an "If In" statement can be
                        used to determine which modes are on.

          Example:      GetGraph 1

                        If ANSI, AVATAR, and RIP are all currently
                        enabled, then variable 1 will be set to contain
                        all those keywords, "ANSIAVATARRIP" so that each
                        code can be checked for.

          Example:      GetGraph 1
                        Assign 2 ANSI
                        If 2 in #1
                          Display "ANSI is enabled"
                        EndIf



          GetParameter                                               (ELE)
          
          Syntax:       GetParameter <var num> <parameter num>

          Description:  This retrieves a parameter as given on the
                        command-line by EleBBS. This can be useful
                        if you want to use one script several times.
                        This command is also used in the YESNO.Q-A
                        file which is automatically run instead of
                        the regular '(Y/n)?' prompt.

          Example:      GetParameter 5 1

                        Assigns parameter 1 to variable number 5.



          GetRawKey                                                  (ELE)
          
          Syntax:       GetRawKey <var num>

          Description:  Similar to the GetArrowKey function, but does
                        not convert the pressed key to upper case, and
                        it does not convert the Enter key to a pipe
                        symbol. It waits for a keypress from the user and
                        returns the key pressed when there was no cursor
                        key pressed. When there was a cursor key pressed,
                        EleBBS will return "UP", "DOWN", "RIGHT" or
                        "LEFT" according to the key pressed. The Ins key
                        will return "INSERT" and the Del key will return
                        "DELETE".

          Example:      GetRawKey 1

                        Gets the key pressed in variable number 1.



          GetSystemName                                              (ELE)
          
          Syntax:       GetSystemName <var num>

          Description:  Puts the Name of your BBS into <var num>.
                        This is the name you have defined in ELCONFIG
                        under SYSTEM > SITE INFO.

          Example:      GetSystemName 1

                        This puts the BBS name into variable number 1.



          GetTelnet                                                  (ELE)
          
          Syntax:       GetTelnet <var num>

          Description:  Puts YES or NO into <var num> depending on the
                        type of session. This only returns YES if the
                        session is started using EleBBS's TELSRV, not with
                        other telnet servers like COM/IP or NetModem.

          Example:      GetTelnet 1

                        This puts YES into variable number 1 if the current
                        node is running EleBBS's TELSRV.



          GetVolumeLabel                                             (ELE)
          
          Syntax:       GetVolumeLabel <var num> <drive letter:>

          Description:  Writes the Volume label of the hard drive specified
                        to the variable.

          Example:      GetVolumeLabel 1 C:

                        This will put the volume label of drive C: into
                        variable number 1.



          GetXY                                                      (ELE)
          
          Syntax:       GetXY <var num> <varnum>

          Description:  Gets the X and Y screen positions of the cursor
                        into the two variables.

          Example:      GetXY 1 2

                        This will put the X position of the cursor into
                        variable number 1, and the Y position of the
                        cursor into variable number 2.



          Gosub                                                   (RA/ELE)
          
          Syntax:       Gosub <label>

          Description:  Goes to a Subroutine in the current script,
                        starting at the specified <label>. Once a
                        "Return" command is encountered in this sub-
                        routine, then the script processor goes back
                        to the code just after the Gosub command.
                        A label may be 1 to 12 alphanumeric characters
                        in length. Labels are always preceded by a
                        colon ":".

          Example:      Gosub TestLabel
                        Display "The subroutine finished.|"
                        Quit

                        :TestLabel
                        Display "This is a subroutine!|"
                        Return

                        This will cause the script interpreter to go to
                        the TestLabel section, which displays
                        "This is a subroutine!" and then returns to the
                        original code, which then displays
                        "The subroutine finished."



          Goto                                                    (RA/ELE)
          
          Syntax:       Goto <label>[#var num]

          Description:  Goes to a different section in the current script,
                        at the specified <label>.
                        A label may be 1 to 12 alphanumeric characters
                        in length. Labels are always preceded by a
                        colon ":".
                        A variable number can be embedded in the label,
                        by preceding it with the # character. This will
                        add the contents of that variable to the label.


          Example:      If 1 = "YES"
                          Goto TestLabel
                        EndIf
                        Quit

                        :TestLabel
                        Display "The answer was YES!|"
                        Quit

                        This will cause the script interpreter to go to
                        the TestLabel section if variable 1 is "YES",
                        which then displays "The answer was YES!" and
                        the script terminates.

          Example:      Assign 1 five
                        Goto plan#1

                        This will cause the script interpreter to go to
                        a label called PLANFIVE


          If                                                      (RA/ELE)
          
          Syntax:       If <var num[~]> <operator> <operand>

          Description:  Performs a comparison of two items, and takes
                        actions according to the result of this
                        comparison. The result of a comparison is
                        considered to be either true or false.  If the
                        comparison is found to be true, then all lines
                        up to the next EndIf are processed.

                        Specifically, this command compares the
                        contents of the variable <var num> with the
                        contents of <operand> using the type of
                        comparison specified in <operator>.

                        <Var num> may be any variable number between 1
                        and 100 (only up to 50 in the DOS versions)
                        followed  by an optional numeric identifier "~"
                        called a tilde, which indicates that a numeric
                        comparison is to be made instead of a text
                        based comparison.

                        <Operator> may be any combination of:

                           =       Equal to.
                           <       Less than.
                           >       Greater than.

                        <Operand> values may be:

                        *   Literal text without quotation marks or spaces.
                        *   Literal text enclosed in quotation marks.
                        *   A variable number, specified as #<var num>.
                        *   The value of any ^K or ^F macro code.
                            (these are listed in macros.txt)

                        When comparing the contents of a variable
                        specified as <var num> with the contents of
                        another variable specified as <operand>, the
                        <operand> variable number must be preceded by
                        the # character.

          Example:      If 5~ => 10

                        Would return true if the numeric value of variable
                        number 5 was equal to or greater then ten. The "~"
                        character was used to indicate that a numeric
                        comparison should be made.


          Example:      If 1 = #2
                          Display "|They are both the same."
                        EndIf  
                        Would return true if the text contained in variable
                        number 1 and variable number 2 were the same, in
                        which case the text is displayed.



          Example:     If 1 = "YES"
                          Display "|The answer was YES."
                        Else
                          Display "|The answer was NOT YES"
                        EndIf

                        Same as above example, but this uses the ELSE
                        command to perform 


                        Would return true if variable number 1 contained
                        "YES", in which case the text "The Answer was YES."
                        is displayed. Otherwise the other text is displayed.




          If in [at]                                                 (ELE)
          
          Syntax:       If <var num> in #<var num> [at <var num>]

          Description:  Searches for the contents of the first variable
                        within the second variable. If a match was found,
                        it can [optionally] store the resulting offset of
                        the match in the third variable.

          Example:      If 1 in #2
           
                        Searches variable number 2 to find if it contains
                        the text in variable number 1. If a match occurs,
                        any code below here and before the EndIf statement
                        is executed.

          Example:      If 1 in #2 at 10
                        
                        Searches variable number 2 to find if it contains
                        the text in variable number 1. If a match occurs
                        starting at the 5th character of variable number
                        2, then variable number 10 is set to 5, and any
                        code below here and before the EndIf statement is
                        excuted.
                       
                        The # character must always be specified in front
                        of the second variable number.


          Inc                                                        (ELE)
          
          Syntax:       Inc <var num>

          Description:  Increases the variable value by one.

          Example:      Inc 1

                        Will add 1 to the value of variable number 1.



          IncludeQA                                                  (ELE)
          
          Syntax:       IncludeQA [path]<filename>

          Description:  This includes another Q-A file, which is read into
                        into memory and executed as if it was part of the
                        current Q-A file. The included file does have some
                        limitations, as it may not contain any subroutines
                        that are called by the main routine. Up to 10
                        IncludeQA's can be nested, so that one Q-A can
                        include another, which in turn includes another.
                        All the included Q-A's and the master Q-A can
                        share the same variables.

                        If a path is not specified, then the file is
                        loaded from the current language files Q-A
                        directory. If no such directory is defined then it
                        is loaded from the system directory instead.

          Example:      IncludeQA DATAFILE.Q-A

                        This reads the DATAFILE.Q-A into memory, and
                        executes it. Control is then returned to the first
                        Q-A.


                       
          KeyPress                                                   (ELE)
          
          Syntax:       KeyPress 1

          Description:  Checks the keyboard buffer to see if any keys have
                        been pressed, and sets the result (YES or NO) in
                        the defined variable number.

                        If the result is YES, then the key is still in the
                        buffer, so it can be then read by using either a
                        GetArrowKey or GetRawKey command afterwards.

          Example:      KeyPress 1

                        Puts either YES or NO into variable number 1.



          Length                                                     (ELE)
          
          Syntax:       Length <var num> <var num>

          Description:  Stores the length of the second variable into the
                        first variable.

          Example:      Assign 2 EleBBS
                        Length 1 2
                        Display 1

                        This will display "6".



          ListAnswer                                              (RA/ELE)
          
          Syntax:       ListAnswer <var num>

          Description:  Displays the contents of variable number <var
                        num> followed by a carriage return.

          Example:      Display "Enter your email address: "
                        Ask 40 2
                        Display "You entered: "
                        ListAnswer 2

                        This will prompt the user for their email address
                        which can be up to 40 characters in length and
                        stores the result in variable number 2. Next, the
                        text "You entered: " is displayed followed by the
                        contents of variable number 2 and a C/R.


                        This is very similar to the "Display <var num>"
                        command which does not send a carriage return.



          LowerCase                                                  (ELE)
          
          Syntax:       LowerCase <var num>

          Description:  Converts any upper case letters in the defined
                        variable number to lower case.

          Example:      LowerCaseCase 1

                        This would convert all the text in variable number
                        1 to lower case.



          MenuCmnd                                                (RA/ELE)
          
          Syntax:       MenuCmnd <menu num> <opt data>

          Description:  Executes a menu command just as if it were
                        executed from within a menu.  Specify the menu
                        function number <menu num> followed by the
                        contents of the optional data field <opt data>.

                        Menu branching function types should not be used
                        here, such as Goto (type 1), Gosub (type 2),
                        and Return from Gosub (type 3).

          Example:      MenuCmnd 27 1 /T=Sysop

                        This would run menu function type 27 (-
                        "Postmessage" with an optional data field of
                        "1 /T=Sysop" which would allow the user to
                        post a message into message area 1 addressed
                        to the System Operator. Refer to the RA docs
                        for information about the menu function types.



          OutputAnswer                                            (RA/ELE)
          
          Syntax:       OutputAnswer "<description>" <var num>

          Description:  Writes the text string specified in <description>
                        followed by the contents of  variable number
                        <var num> to the answer file.

                        The default name of the answer file is the same
                        as the .Q-A questionnaire file but has an
                        extension of .ASW.


                        Ctrl-K and Ctrl-F Text file control codes are
                        fully supported within the description field.
                        (see MACROS.TXT for info on control codes).


          Example:      OutputAnswer "Operate a BBS? : "  5

                        In this example the text "Operate a BBS? : "
                        followed by the text stored in variable
                        number 6 are written to the answer file.

                        Before using OutPutAnswer the first time in
                        a script, its a good idea to first use the
                        PostInfo command to write a header to the
                        answer file.

          Example:      PostInfo
                        OutputAnswer "Operate a BBS? " 5

                        Assuming variable number 5 is "YES", the
                        resulting entry in the answer file would be:

            **John Doe completed questionnaire at 1:00 on Jan-01-2000**
            Operates a BBS? : YES



          PostInfo
          
          Syntax:       PostInfo

          Description:  Writes a header to the answer file which
                        contains the user's name and the time and
                        date that the information was written.


          Example:      PostInfo

                        This writes a line to the answer file that
                        looks like:

             **John Doe completed questionnaire at 1:00 on Jan-01-2000**




          Ord                                                        (ELE)
          
          Syntax:       Ord <var num> <var num>

          Description:  Puts the ascii numeric value of the first
                        character of the second variable number into
                        the first variable.

          Example:      Assign 2 dog
                        Ord 1 2

                        This will store the ascii value of the letter 'd'
                        in variable number 1.



          PageMode                                                   (ELE)
          
          Syntax:       PageMode <var num> <var num>

          Description:  Sets the variables with the current paging modes.
                        The first variable is set to ON or OFF depending
                        on whether the user is allowed to page the SysOp.
                        The second variable is set to ON or OFF depending
                        on whether the scroll-lock is on. When the scroll-
                        lock is enabled, EleBBS will not make any paging
                        sounds.

          Example:      PageMode 1 2

                        Sets variables numbers 1 and 2 to ON or OFF.



          PopColor                                                   (ELE)
          
          Syntax:       PopColor <slot number>

          Description:  Retrieves the saved text attribute. You can
                        retrieve one of the 20 previous saved text
                        attributes.

          Example:      PopColor 1

                        Retrieves the saved text color from Cslot 1.



          PopX                                                       (ELE)
          
          Syntax:       PopX <slot number>

          Description:  Retrieves the saved horizontal position of the
                        cursor. You can retrieve one of the 20 previous
                        saved cursor positions.

          Example:      PopX 1

                        Retrieves the saved horizontal cursor position
                        from Xslot 1.



          PopY                                                       (ELE)
          
          Syntax:       PopY <slot number>

          Description:  Retrieves the saved vertical position of the
                        cursor. You can retrieve one of the 20 previous
                        saved cursor positions.

          Example:      PopY 1

                        Retrieves the saved vertical cursor position
                        from Yslot 1.



          PushColor                                                  (ELE)
          
          Syntax:       PushColor <slot number>

          Description:  Saves the current color attribute which
                        EleBBS will use to display text to a
                        buffer. You can define up to 20 'slots'
                        to save it in.

          Example:      PushColor 1

                        Saves the current attribute in Cslot 1.



          PushX                                                      (ELE)
          
          Syntax:       PushX <slot number>

          Description:  Saves the current horizontal position of the
                        cursor to a buffer. You can define up to 20
                        'slots' to save it in.

          Example:      PushX 1

                        Saves the current horizontal cursor position
                        in Xslot 1.


                        
          PushY                                                      (ELE)
          
          Syntax:       PushY <slot number>

          Description:  Saves the current vertical position of the
                        cursor to a buffer. You can define up to 20
                        'slots' to save it in.

          Example:      PushY 1

                        Saves the current vertical cursor position
                        in Yslot 1.



          Quit                                                    (RA/ELE)
          
          Syntax:       Quit

          Description:  Terminates the script and returns operation to
                        the BBS.

          Example:      Quit

                        This causes the interpreter to stop processing the
                        script and returns to the BBS.



          Random                                                     (ELE)
          
          Syntax:       Random <max value> <var num>

          Description:  Stores a random number into the defined variable
                        number, between zero and one less the defined
                        value.

          Example:      Random 10 1

                        Stores a value between 0 and 9 into variable
                        number 1.


  
          Return                                                  (RA/ELE)
          
          Syntax:	Return
          
          Description:  Returns from a Gosub (see GoSub command).
                        Transfers control back to the command
                        immediately after the last Gosub command
                        that was executed.

          Example:      Return


          
          SetFlag                                                 (RA/ELE)
          
          Syntax:       SetFlag <flag set/number> <ON|OFF>
          
          Description:  Turns either ON or OFF any of the 208 user
                        access flags. The <flag set/number> starts
                        with either A, B, C, or D is followed by 1
                        digit from 1 to 8. Each flag can be used for
                        any porpoise the system operator or scripter
                        chooses, and the flag settings are recorded
                        within the user database.
          
          Example:	SetFlag A8 ON
          	
                        This example turns user access flag A8 ON.
          


          SetSecurity                                             (RA/ELE)
          
          Syntax:	SetSecurity <sec level>
          
          Description:  Changes the users security level.  The level
                        security level may be any number between 1 and
                        65,535.  The changes to the users security
                        level are recorded within the user database.
                        A comma should never be used, even for values
                        of 1000 or more.
          
          Example:	SetSecurity 5000
          
                        This sets the current user's security level to
                        5000.
          


          SetOLM                                                     (ELE)
          
          Syntax:       SetOLM <on or off>

          Description:  Turns the multinode OLM (On-Line Messages) on
                        or off. This is useful if you do not want the
                        on-line messages to interrupt the current script.
                        Setting them to off will prevent EleBBS from
                        checking for them while the script is running.

          Example:      SetOLM OFF

                        This prevents EleBBS from checking for on-line
                        messages while the script is running.



          SetResult                                                  (ELE)
          
          Syntax:       SetResult <text>

          Description:  Returns a value to EleBBS. This is only useful
                        for questionnaire files that are supported by
                        EleBBS internally.

          Example:      SetResult YES

                        Returns YES to EleBBS.



          SetChatReason                                              (ELE)
          
          Syntax:       SetChatReason <var num>

          Description:  Sets the reason why the user wants to chat to
                        the text defined in the variable number.
                        This function is useful for custom pager
                        scripts.

          Example:      SetChatReason 1



          SetChatWanted                                              (ELE)
          
          Syntax:       SetChatWanted <on or off>

          Description:  Displays the flashing "Wants Chat" when the status
                        bar is set to mode 5, indicating that the user has
                        requested to chat with the sysop.

          Example:      SetChatWanted ON



          SetResultVar                                               (ELE)
          
          Syntax:       SetResultVar <var num>

          Description:  Similar to the SetResult function. Returns a value
                        to EleBBS. This is only useful for questionnaire
                        files that are supported by EleBBS internally.

          Example:      SetResultVar 1

                        Returns the value of variable number 1 to EleBBS.



          SetStatusBar                                               (ELE)
          
          Syntax:       SetStatusBar <value>

          Description:  Sets the status bar (at the bottom of the screen)
                        to the desired mode from 1-10. These are the same
                        modes that can be set by the sysop by pressing
                        the F1 through F10 keys on the sysops keyboard.

                        The following StatusBar modes are available:

                        1 - Name, City, Baud, Security, Time Left, Node,
                             Paging Mode, Graphic mode, WantsChat flag.
                        2 - Phone Numbers, First/Last/Total calls, Age/DOB.
                        3 - Uploads, Downloads, Taged files, Flag Setings.
                        4 - Last Caller, Total BBS calls, Time, Next Event.
                        5 - Msgs Posted, Language, Group, Credit, Handle.
                        6 - Comment, Reason for chat.
                        7 - EMSI information.
                        8 - Nothing.
                        9 - Alt-Key Help menu.
                        10- Remove status bar.

          Example:      SetStatusBar 6

                        This will set the StatusBar to Mode 6.



          SetTime                                                    (ELE)
          
          Syntax:       SetTime <value or #var num>

          Description:  Sets the users time left today to the number of
                        minutes specified. 

          Example:      SetTime 100

                        Sets the users time left today to 100 minutes.

          Example:      SetTime #1

                        Sets the users time left today to the value in
                        variable number 1.


                       
          SetEditor                                                  (ELE)
          
          Syntax:       SetEditor <text>

          Description:  Overrides the default Message Editor command line
                        specified in CONFIG.RA for the current session.
                        (ELCONFIG > OPTIONS > MESSAGES > EXTERNAL EDITOR)
                        The setting will not be saved after the user
                        logs off.  This allows a script to choose a
                        different message editor for the current user.

          Example:      SetEditor C:\BBS\ICEEDIT\ICEEDIT.EXE -N*N

                        This sets the command line to use IceEdit as
                        the current sessions message editor. The *N
                        Macro is replaced with the node number.

          Example:      SetEditor INTERNAL

                        This sets the internal message editor built into
                        EleBBS as the current sessions message editor.



          SetUserOn                                                  (ELE)
          
          Syntax:       SetUserOn <text>

          Description:  Writes up to 10 characters to the USERON.BBS
                        describing to other nodes what the user is
                        currently doing.
          
          Example:      SetUserOn Browsing

                        Writes the text "Browsing" to that nodes
                        useron setting.



          SetUserVar                                                 (ELE)
          
          Syntax:       SetUserVar <char> <text or #varnum>

          Description:  Sets any of the Users internal records that
                        are displayable using a Ctrl-F () macro.

                        This is a very powerful command, as it allows
                        changing nearly any of the information in the
                        users record, such as the number of uploads,
                        downloads, their organization, their address,
                        kbyte transfers, or dozens of other records.

                        The character that is passed is the same one
                        used in the corresponding Ctrl-F () macro.
                        See MACROS.TXT for a full list of the  macros.

                        This command does NOT support Ctrl-K () macros.


          Example:      SetUserVar [ Visiting Sysop
     
                        Since Ctrl-F[ (also known as [ in MACROS.TXT)
                        is the macro to display the users comment field,
                        using "[" as the character passed will write the
                        words "Visiting Sysop" to their comment field.
                       
          Example:      SetUserVar ~ #1

                        Since Ctrl-F~ (also known as ~ in MACROS.TXT)
                        is the macro to display the users organization
                        field, using "~" as the character will write the
                        text stored in variable number 1 to the users
                        organization field.



          SetX                                                       (ELE)
          
          Syntax:       SetX <value>

          Description:  Sets the horizontal cursor position to the desired
                        location.

          Example:      SetX 80

                        Moves the cursor to the right edge of the screen.



          SetY                                                       (ELE)
          
          Syntax:       SetY <value>

          Description:  Sets the vertical cursor position to the desired
                        location.

          Example:      SetY 24

                        Moves the cursor to the bottom line of the screen.



          SubString                                                  (ELE)
          
          Syntax:       SubString <var num> <var num> <value> <value>

          Description:  Copies part of the second variable into the first
                        variable, starting at the offset of the first
                        value, up to the number of characters in the
                        second value.

          Example:      Assign 2 supercalifragilisticxpalidocus
                        SubString 1 2 10 5
                        Display 1

                        This would display "fragi" because variable number
                        1 now contains 5 characters from variable 2,
                        starting at character number 10.



          SubStringVar                                               (ELE)
          

          Syntax:     SubStringVar <var num> <var num> <var num> <var num>

          Description:  Similar to the SubString function, but uses four
                        variables.

                        Copies part of the second variable into the first
                        variable, starting at the offset found in the
                        third variable, up to the number of characters in
                        the fourth variable.

          Example:      Assign 2 supercalifragilisticxpalidocus
                        Assign 3 10
                        Assign 4 5
                        SubStringVar 1 2 3 4
                        Display 1

                        This would display "fragi"
                        because variable number 1 now contains 5 characters
                        from variable 2, starting at character number 10.



          UpperCase                                                  (ELE)
          
          Syntax:       UpperCase <var num>

          Description:  Converts any lower case letters in the defined
                        variable number to upper case.

          Example:      UpperCase 1




          WaitEnter                                               (RA/ELE)
          
          Syntax:	WaitEnter

          Description:  Waits for the user to press the [ENTER] key.
                        If any other keys are pressed they are ignored.

          Example:	Display "Press <Enter> to continue" 
                        WaitEnter

          

          WasSysopKey                                                (ELE)
          
          Syntax:       WasSysopKey <var num>

          Description:  Determines if the last key pressed was pressed
                        by the user or the sysop. If it was the sysops
                        key then <var num> will be "YES". If it was the
                        users key then <var num> will be "NO".

          Example:      WasSysopKey 1

                        If the sysop pressed the last key, then variable
                        number 1 will be set to "YES".



          While do                                                   (ELE) 
          
          Syntax:       While <var num[~]> <operator> <operand> do

          Description:  Creates a conditional loop without requiring a
                        goto label. The syntax is the same as the "If"
                        statement. It is used to perform comparisons
                        within your script, and perform actions based
                        on the results of the comparisons.  The result
                        of the comparison is considered to be either
                        true or false.  If the comparison is found to
                        be true, then all lines up to the next EndWhile
                        will be performed. <var num> may be any variable
                        number, which can be followed by an optional "~"
                        tilde character to indicate that the comparison
                        should be numeric rather then a text comparison.

                        The <operator> can be any combination of:
                            =       Equal to
                            <       Less than
                            >       Greater than

                        The <Operand> can be:

                            A variable number specified as #<var num>
                            Literal text enclosed in quotation marks.
                            A ^K or ^F control code.

          Example:      While 1~ <= #2 do
                          Display "|Counting ..." 1
                          Inc 1
                        EndWhile


                        Counts up to the value stored in variable number 2




       Recommended reading for more information on the Script Language
       ===============================================================
       Since this documentation only covers the bare commands of the
       EleBBS Script Language, I suggest you also have a look at the
       following:

       RADOC.ZIP    This is the full documentation for RemoteAccess BBS,
                    the BBS software that EleBBS was originally modeled
                    after. Since EleBBS is 100% backwards compatible
                    with RemoteAccess 2.50, this document is essential
                    to understanding how EleBBS works. Several example
                    RA questionnaire scripts are included in this.
                   
       Q&A4RA11.ZIP This is a FAQ called "Questions and Answers for
                    RemoteAccess" written by Eric Staufer. This also
                    contains many example RA questionnaire scripts.


       The best way to learn more about scripting, is to study some
       of the existing scripts made for RA and EleBBS. A few scripts
       are included in the SAMPLES.ZIP archive that came with EleBBS,
       and many more are available from pcmicro and other locations.

       These files, plus some frequently asked questions, and links
       to several advanced EleBBS Scripts can be found at:

       http://pcmicro.com/elebbs/faq
       -----------------------------

