______________________________________________________________________________
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

                     P R O C H A T   D O C U M E N T S

                            Version 2.0 (DLG)

                        Programmed by Riku Puustinen

______________________________________________________________________________
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
(Look Registration.doc for how to register the ProChat!)

______________________________________________________________________________
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
#0 INDEX

      !* = Please read at least these sections!

    #0 INDEX

 !* #1 WHAT IS THE PROCHAT?

    #2 THESE DOCUMENTS

 !* #3 PROCHAT'S REQUIREMENTS

 !* #4 INSTALLING THE PROCHAT
        #4.1 Installing to the (hard)disk
        #4.2 Linking the ProChat to the Dialog's menu

    #5 CONFIGURATION
        #5.1 ProChatConfigEditor
        #5.2 Changing ProChat's texts

    #6 USING THE PROCHAT
        #6.1 What happens before chat-screen
 !*     #6.2 Chat-screen

    #7 MISCELLANEOUS
        #7.1 Information on the author of the ProChat
        #7.2 Thanks goes to...
        #7.3 History
        #7.4 Future
        #7.5 Bugs and other weird 'features'
______________________________________________________________________________
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

______________________________________________________________________________
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
#1 WHAT IS THE PROCHAT?

        The ProChat is a  chat-program used when a sysop of  a BBS and an user
    of  the BBS want to chat.  Unlike normal  sysop-chats the  ProChat is much
    more  convenient to use.  ProChat opens two  'windows'  which are  used as
    individual  screens for  the sysop  and  the user.  Both writers can write
    simultaneously  to their  own  windows and a text  written by  other  user
    is immediately readable by the other user.

        Of course there are  many  other  nice  features  like  word-wrapping,
    redrawing of the screen, clearing of the window, beeping etc.

        All texts output by the ProChat can be  changed  easily.  Each text is
    in its own file so it's possible to use ANSI-editors if you want.  No more
    language problems!
        Separate  program  named  ProChatConfigEditor  is used to change other
    configurable things.  It's very easy to use  with GadTools user interface.
    With the ProChatConfigEditor you can, for example, set a CLI-command which
    is executed when someone is calling/yelling the sysop.  A font used by the
    ProChat can be set to whatever you want.

                                 ***

        PROCHAT IS NOT A PUBLIC DOMAIN PROGRAM OR OTHERWISE 'FREE'.  THERE ARE
    TWO DIFFERENT PACKAGES OF THE PROCHAT:

        THE DEMO VERSION INCLUDES  ALL NECESSARY FILES,  BUT THE PROCHAT TELLS
    TO THE USER  THAT IT IS  NOT REGISTERED.  SOME QUITE  IMPORTANT  FUNCTIONS
    ARE REMOVED.  YOU CAN NOT CLEAR YOUR WINDOW,  YOU CAN NOT DELETE MORE THAN
    TEN CHARS AND PROCHAT QUITS  WHEN THE TEXT  REACHES THE END OF THE WINDOW.
    THIS MEANS THAT IT IS NOT VERY CONVENIENT TO USE UNREGISTERED VERSION.
        UNREGISTERED  VERSION  IS  FREELY  DISTRIBUTABLE IF ALL ORIGINAL FILES
    ARE INCLUDED WITH IT.

        THE REGISTERED  VERSION  IS  FULLY FUNCTIONAL. IT OUTPUTS A TEXT WHICH
    TELLS WHO HAD REGISTERED THIS VERSION.  THAT IS  BECAUSE  I DONT WANT THAT
    ONE PERSON REGISTERS AND THEN DISTRIBUTES HIS VERSION EVERYWHERE.
        ONLY THE PERSON  WHOSE NAME IS IN  THE PROCHAT IS PERMITTED TO USE THE
    PROCHAT IN HIS BBS.

        THE  AUTHOR  OF  THE  PROCHAT  DOES  NOT  TAKE  ANY  RESPONSIBILITY OF
    POSSIBLE DAMAGES CAUSED BY THE PROCHAT.
______________________________________________________________________________
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""


______________________________________________________________________________
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
#2 THESE DOCUMENTS

        This  file  includes  all  the  information  you  need  to  know  when
    installing, using and configuring  the ProChat.  This particular  document
    is for the Dialog (DLG) version of the ProChat.

        It is not necessary to read hole document,  but read at least sections
    marked with !* in index (#0).
______________________________________________________________________________
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""


______________________________________________________________________________
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
#3 PROCHAT'S REQUIREMENTS

        ** AmigaOS 2.0 is required **
    The ProChat is developed  in v2.04 (v37) system,  but v36 should be enough
    too  (not tested).  If you have AmigaOS  version  <2.0  you have to forget
    this program or upgrade your Amiga.

        One requirement is that all files are installed  properly.  Look at #4
    for how to install the ProChat.

        One  of  the  ProChat  functions  uses a MORE-program to display text.
    If you don't change the ProChat to use some other text displayer make sure
    you have MORE in your C: or some other place from where AmigaDOS finds it.
    (ProChat executes More with command 'run <>nil: more text'.)

        The ProChat takes about 50 kB of memory.
______________________________________________________________________________
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""


______________________________________________________________________________
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
#4 INSTALLING THE PROCHAT

    #4.1 Installing to the (hard)disk

            The Dialog uses DOORS: as a normal place for doors. The ProChat is
        meant to be copied there.   If you have  extracted the PC.LHA directly
        to the right place with the help of the READ_ME_FIRST text you can now
        skip to the section #4.2.

            If you haven't followed directions given in the READ_ME_FIRST file
        you should extract archive again: LHA E PC.LHA DOORS: or you must copy
        all files to right directories this way:

            DOORS:
                  ProChat/
                          ProChat
                          ProChatConfigEditor
                          ProChat.doc
                          Config/
                                 Abort.ansitext
                                 ByeBye.ansitext
                                 CallingSysop.ansitext
                                 CantRecallYet.ansitext
                                 ChatNotAllowed.ansitext
                                 ManyTexts.texts
                                 MoreColumnsNeeded.ansitext
                                 MoreRowsNeeded.ansitext
                                 NoConfig.ansitext
                                 NormalColor.ansi
                                 ProChat.config
                                 QuestionColor.ansi
                                 ReasonQuestion.ansitext
                                 SorryNoAnswer.ansitext
                                 SysopAnswered.ansitext
                                 TimeOut.ansitext
                                 TooShortReason.ansitext
                          Config_xxx/
                            .
                            .

            There are more than one config directory.  _xxx config directories
        include   optional   texts  in  different  languages.  Default  config
        directory,   which  is   already  in  use   (copied  to  Config/),  is
        Config_English.  You  can change  between configs by copying different
        Config_xxx/ directories to Config/.  Remember that  when you have some
        problems you can COPY Config_English/#? to Config/ and you get default
        settings and texts back. Of course, it is possible to make  completely
        own config and texts.

    #4.2 Linking the ProChat to the Dialog's menu

            After  the ProChat  is placed to right place it is time to link it
        to the Dialog. See table below for how to do it:

	!! = Important!

        [ 1] Letter:                    C
     !! [ 2] Executable: (path/name)
             DOORS:ProChat/ProChat %PORT "%NAME" %SCWIDTH %SCLENGTH
        [ 4] Description:               Chat with Sysop
        [ 5] Type:                      Executable
        [ 6] Help File                  MAIN/C
        [ 7] Lower level:               1
        [ 8] Upper level:               255
        [ 9] Hidden:                    NO
     !! [10] Load type:                 OVERLAY
        [11] Ask user if sure:          NO
        [12] Pend messages:             YES
     !! [13] Cli mode:                  YES
        [14] Pause on completion:       YES
        [15] Log value:                 None
        [16] Activity string:
        [17] Priority:                  1 (DEFAULT)
        [18] Edit help file

        And now...  let's test it, but remember to read the rest the documents
        because all keyboard functions are not displayed in the chat-screen.
______________________________________________________________________________
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""


______________________________________________________________________________
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
#5 CONFIGURATION

    #5.1 ProChatConfigEditor

            When the  ProChatConfigEditor (PCCEd)  is started it tries to load
        DOORS:ProChat/Config/ProChat.config.  If it is not found PCCEd asks if
        you want make a new config.

            In the window you see  several gadgets.  They represent  different
        configurable  things  and  by  just  looking at  them you see  current
        settings. Here are explanations of the gadgets:

            Window's close gadget is the same as QUIT button.  If something is
        changed PCCEd asks do you really want to exit.

            Zoom-button in the upper-right corner works like it always does.

            When 'Only one  sysop-call per  3  minutes.'  gadget  is  selected
        (checkmark is displayed) the ProChat do not allow   user to call sysop
        more  than once  in three minutes.  It may  sometimes happen  that the
        sysop wants to chat with the user, but he can not because he comes too
        late and  this  option is  selected.   If this  happens the  sysop can
        DELETE T:ProChatXXX file, where XXX is the user's Dialog port.

            When  'Display beep  (flashes screen)  when  calling  the  sysop.'
        gadget is selected  the ProChat uses Intuition's  DisplayBeep  routine
        to catch sysop's attention.  Though  the ProChat  brings its screen to
        front when  the sysop is called,  it may be nice  addition to  get the
        screen-flash  (or sound in AmigaOS 2.1 and 3.0). But if the sysop have
        defined some  CLI-command  which catches his attention screen-flash is
        not neccessary.

            When 'The user is able to quit the ProChat.'  is selected the user
        is able to quit the ProChat.  Normally the sysop doesn't want that the
        user 'escapes' surprisingly.

            The ProChat is able to maintain ProChat.log file,  where  it saves
        things like  calling time,  name of caller,  possible  reason and text
        telling  whether or not  the  sysop  answered.  The log  is  saved  to
        DOORS:ProChat/ProChat.log.   If   'DOORS:ProChat/ProChat.log  file  is
        made/maintained' gadget is selected the log is used.

            String-gadget   named  'Call-CLI-command'  allowes  you  to  set a
        command executed  when  the user  is calling the sysop. Max length 250
        chars. Remember to RUN <>NIL: a program or its output goes to the user
        and the ProChat is stopped until the command finishes.
            For  example, it is  possible  to  put  a  command  which  plays a
        digitized sample.

            The next gadget has three different options.
        'Ask chat-reason  which must   be atleast  10 chars.'  means that  the
        ProChat asks a chat-reason  from the user and ask again if  the reason
        is smaller than 10 chars.
        'Ask chat-reason' is same,  but all reasons are accepted  (except only
        pressing enter aborts).
        'Do not ask chat-reason' means that no chat-reason is asked at all.

            By  pressing  'Change font' button you get  a font  requester from
        which  you  can  select  a  font  for  the  ProChat.  Only  so  called
        fixed-width  fonts  are  allowed (that is why there are so few fonts).
        Don't select too big font!  May be  that the  ProChat can not  anymore
        open a window which is big enough.  Also the user with a bigger screen
        and/or  smaller  font  may feel  that  some space from  his screen  is
        wasted.  (See  #6.1  for how  the ProChat  calculates  the size of the
        window.)

            The next gadget-system is quite complicated  (at least it is quite
        complicated  to  explain it  with my  english ;-).  The  slider-gadget
        allowes you to change current hour to be edited (00-24).  A little box
        containing  numbers  shows  which  hour  is  selected.  A  bigger  box
        containing a and f characters shows every hour and it  current  state.
        'a' means that the ProChat is  allowed to be started at this hour  and
        'f' means that it is not. Currently editable hour is displayed with an
        uppercase  character.  You can change  the state of  the hour by first
        selecting right  hour and  then  using  two little  buttons to  change
        between a and f.
            This feature may be used in many purposes.  You may want that  you
        can not be disturbed in night -> disable night-hours.  You go to spend
        holiday and are not  available in two weeks -> disable  all  hours and
        put an explanation to the user (see changing texts #5.2).

            'Save & Quit' saves the current setup.

            'Undo' returns the same settings when the ProChat was started.

            'Quit' is quit :-). If changes have been made 'Are you sure?'
        question is asked.


    #5.2 Changing ProChat's texts

            You can change  the texts output by  the ProChat.  The  only  text
        which  can  not  be  edited  is  'ProChat  DLG  version  2.0  (c) Riku
        Puustinen'.  The  ProChat do not check that  texts  are 'good' and the
        ProChat do not add linefeeds etc. so it is  important that  you do not
        remove  neccessary  linefeeds at the beginning  and at the end  of the
        texts.

            Make sure that the texteditor  you use does not add  automatically
        linefeed to the end of the file when saving it.

            If you decide to use ANSI-codes to  add colors to the texts  it is
        very wise to select  odd colors for the background and even colors for
        the foreground or on the contrary.  If you make  this you  can be sure
        that users with only two colors  never suffer  from I-can-not-see-text
        problem.

            The ProChat uses three different kinds of texts. The type of the
        text indicated with its filename ending.

            .ANSITEXT texts are normal  texts  which  can  have  ANSI  control
        sequences in them.   Remember to set normal  colors back at the end of
        a text.  You  should  understand the use of the  each  text by reading
        through them and using the ProChat.

            .ANSI texts must consists of only ANSI control sequences and other
        invisible things that does not move the cursor.  QuestionColor.ANSI is
        user to change color when drawing  chat-reason-box  and  name lines in
        the chat-screen.  NormalColor.ANSI  is  used  to change  color back to
        normal after QuestionColor.ANSI have been used.

            .TEXTS text consists of many different little texts, which may not
        include any ANSI codes or linefeeds etc.  Every  line of  this file is
        one text and it is important that they are kept in the same order they
        are and no linefeeds should be added.  Here are the  explanations  for
        every in order from start to end:

                1. line contains a text which is in the  Answer-gadget (gadget
            which must be pressed if the sysop answer  to  the  chat-request).
            The first letter of this text  and its  upper/lowercase  letter is
            underlined and used as a key which can be pressed instead of using
            the mouse. This text should be quite short.

                2. This text is output after the Answer-gadget.  Do  not  make
            this too long  (max length  depends on the  size of the window and
            the length of the 1. text).

                3. This text is before user's name  in  window  where  is  the
            Answer-gadget.

                4. This is same as 3 but this is before the chat-reason.

                5. This text is the sysop's name displayed in the the  sysop's
            name line.

                6. Same  as 3 but  displayed  before  number  showing how much
            the sysop has time to answer.  (This text is only for  the sysop's
            window, the user's text is in other place).

                7. This text is put to  the log file if  the sysop  answers to
            the chat-request.  A text 8. is put if  the sysop  doesn't answer.
            Lines in the ProChat.log file  grow easily more than 80 chars long
            so don't make these texts long.

                9. This  text is  help line  displayed at  the  bottom  of the
            chat-screen.

                10. This line is not a real text.  It is  a command  which  is
            executed  when the  sysop  wants to  look at  user's  notes  file.
            (See #6.2 if you want to know more about notes).
______________________________________________________________________________
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""


______________________________________________________________________________
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
#6 USING THE PROCHAT

    #6.1 What happens before chat-screen

            After the ProChat is started it  tries to open libraries,  devices
        and  things  like  that.   If  something  fails  an  error  message is
        displayed. However, all possible errors do not have a text.  When this
        kind of error happens the ProChat returns failed return codes:

        21  Wrong arguments. Look at #4.2 for what  arguments  are needed  and
            forget " character around the name.
        22  Not enough memory.
        23  Can't open dos.library. Do you have OS 2.0?
        24  Not enough memory.
        26  No free signals.
        27  Can't find public screen.
        28  Can't open utility.library.
        29             graphics.library.
        30  Too a few rows/columns in users/sysops screen.
        31  Can't open diskfont.library.
        32  Can't find selected font.
        33  Not enough memory.
        60  Failed to launch BabyTask.


        The first  text output  by  the ProChat is  the only  one you  can not
    change. It displays ProChat's name,  version etc.  The next text output is
    Welcome.ansitext.  Then the ProChat loads  its configs  and checks  if the
    the sysop has allowed him to be called at this hour.

        If the chat-reason should be  asked it is next thing which the ProChat
    does.  If the user  presses only enter or  does nothing in  20 seconds the
    ProChat quits. Length of the reason is checked if the config says so.

        Now it is  time  to open  a window.  There  are  all  things that  are
    used to calculate right size for the chat-window:
    - User's columns
    - User's rows
    - Sysop's screen _visible_ size (text overscan)
    - The size of the font of the sysop's screen
    - Window border sizes
    - The size of the ProChat's font
        However,  the  ProChat  never opens a window which doesn't  leave  any
    free space in the screen.   Min-size for  the ProChat is 40 columns and 11
    rows.

        When the window is  opened the ProChat starts  to call the sysop.  The
    sysop  sees user's name and  chat-reason in  the window and  can answer by
    pressing answer-gadget.  If the sysop  doesn't want to chat it is possible
    to close window immediately.  When the sysop closes  the window user won't
    see it, because in the user's screen all continues as normal.


  #6.2 Chat-screen

        After the sysop has answered to the char-request the ProChat opens the
    chat-screen and draws two chat-windows to it.  Now both  chatters can type
    text and they do not have to worry what the other one is doing. At the end
    of the chat-window the ProChat wraps words automatically or if the word is
    long it is cut to  two pieces.  When  the chat-window is full  the ProChat
    jumps back to the first line and  always clears next line.  Normal kind of
    scrolling is not used because it is too slow.

        At the begining it can be  little disturbing  that the cursor moves so
    much and isn't  always there where your text goes.  I can say that you get
    used to it.  And of course  the ProChat has a fine  feature:  it moves the
    cursor back to the 'real owner' after one second's delay  (delay is needed
    because if you move  cursor back after every  letter written  by the other
    user the ProChat  slows down considerably (moving cursor ANSI is almost 10
    chars long)).

        List of the ProChat's special functions:

        DEL    Deletes a previous  letter or jumps to the end of  the previous
               line.

        ENTER  Jump to the next line.

        TAB    Tabulator works as normal. Its length is 8 chars.  Actually the
               ProChat uses spaces to output  TABs because  TAB-size  can vary
               between different computers.

        CTRL+Z Quit.  It can be defined so that only  the sysop is able to use
               this.

        CTRL+R Redraw all. Draws the hole screen again. This is useful if some
               weird letters starts to appear in the screen.

        CTRL+A Clear.  Clear  the  chat-window and moves  cursor to  the first
               line.

        CTRL+G Beep.  Output  an  ASCII BELL  character  to  the  both  users.
               Normally this causes a beep or something like that.

    Only for the sysop:

        CTRL+N Uses some textdisplayer (normally MORE) to display user's
               notes-file.

        Window's close button is same as CTRL+Z.

        Window's zoom button works as normal. When the  ProChat is  zoomed  to
               titlebar it works like normal. You type text etc.
______________________________________________________________________________
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""


______________________________________________________________________________
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
#7 MISCELLANEOUS

    #7.1 Information on the author of the ProChat

        Name: Riku 'RiP' Puustinen

        Post-address: Riku Puustinen
                      Lahdenpohjantie
                      33980 PIRKKALA
                      Finland
                      Europe

        Fidonet: 2:222/325.3

        Bug reports, suggestions etc. welcomed.

        I am also extremely grateful if somebody sends me an Amiga 4000.


    #7.2 Thanks goes to...

        There is a little list containing some people who had helped me:
            Erno Tuomainen (Finland)
            Atte Lehtinen (Finland)
            Pasi Ojala (Finland, the author of the AXsh)
            Juha Tuominen (Finland, the second author of the AXsh)
            Markus Hansson (Sweden)
            ... all registered users!
            ... Commodore for the Amiga!

    #7.3 History

        1.0 The first released version.

        2.0 Completely reprogrammed.


    #7.4 Future

        At least I try to fix bugs if/when they are found.


    #7.5 Bugs and other weird 'features'

        2.0-snapping  doesn't work.  You can paste text  but you can't  cut it
        from the ProChat window.

        The last character  of the user's helpline is missing.  There  is good
        reason to that: If the ProChat uses all columns and rows in the user's
        screen and the last line  (help-line)  is output with last  character,
        user's terminal program scrolls one line and you know what it means...

        The ProChat doesn't make any marks to the DLG's logs.

        Works in the OS 3.0 but doesn't support it.

        Some rarely seen error messages may be missing.

        Because every text is located to own file they take quite a much space
        from disk.  This is because  I want  that texts can  be easily  edited
        with ANSI-editors.

        No 2.1 locale support.  1) This is 2.0 program.  2) It is not easy for
        sysops to edit locale files.
______________________________________________________________________________
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
