@DATABASE "Miami Control AmigaGuide"

@NODE MAIN "Miami Control Documentation"



                             Miami Control
                             ~~~~~~~~~~~~~

    Welcome to the docs for Miami Control.

    Feel free to make any changes to the script, but please send me any
    modifications if you think they might be useful to anyone else and I may
    distribute them with the next release.

    You may not use the script, or parts of the script in your own productions
    without my permission.


            @{" Introduction    " Link 0.} - What is Miami Control?
            @{" Installation    " Link 1.} - How to install it.
            @{" Requirements    " Link 4.} - Cray XMP, 3GB Ram, 35GB HD space...

            @{" Usage           " Link 2.} - How you use it.
            @{" Trouble Shooting" Link 3.} - Erm, How to shoot trouble ;)

            @{" FAQ             " link FAQ} - Frequently Asked Questions

            @{" History / Future" Link 9.} - Where has/will it been/go?
            @{" Author          " Link 7.} - Who made it?


@ENDNODE
@node FAQ "FAQ"

                                FAQ

        Q: Where did you get the idea for Miami Control from?
        A: When someone on a mailing list I'm on mentioned they run Miami using
        inline ARexx to put it on and offline without having to load the GUI, I
        thought I would do the same. Then I thought "Why bother using two buttons,
        when one will do?", and it just progressed from there...


        Q: Help!!! It doesn't work!!!
        A: Read the docs. If you can't find any help here, 'mail me.


        Q: Why didn't you use the C= Installer?
        A: Because I know how to write shell scripts - they are very easy to write,
        and for a project as simple as this, anything more complex isn't needed.
        I might write a proper installer in future, but don't count on it :)


        Q: My teleco/country has different call systems to yours. Can you change it
        for me?
        A: It's already pretty configurable. If you do need something changing,
        please contact me, and I'll try to impliment it, even if it means creating
        a new executable or script.


        Q: Can you help me with this script/write me a script to do something?
        A: Probably :)


@{" Introduction    " Link 0.}
@{" Installation    " Link 1.}
@{" Requirements    " Link 4.}
@{" Usage           " Link 2.}
@{" Trouble Shooting" Link 3.}
@{" History / Future" Link 9.}
@{" Author          " Link 7.}

@endnode

@NODE 0. "Introduction"



                            Introduction.

        Miami Control is an ARexx script designed to control the main features of Miami
        without having to load the GUI, saving memory and screen space.

        From a single button/menu item (depending on what software you use to start
        it) you can go on and offline, load the GUI to change your settings, quit
        Miami to save memory and see how long you've been online. It will also tell
        you the speed your modem is connecting at AND the cost of each call, all
        without a trace of Miami's GUI!

        Miami Control will also store a detailed log of your online time.


        Miami Control is e-mailware! If you use you should e-mail me at:

                                tom.hurst@clara.net

        Also please visit my web site - AmiSITE - at:

                               http://surf.to/amisite


@{" Installation    " Link 1.}
@{" Requirements    " Link 4.}
@{" Usage           " Link 2.}
@{" Trouble Shooting" Link 3.}
@{" FAQ             " link FAQ}
@{" History / Future" Link 9.}
@{" Author          " Link 7.}

@ENDNODE

@NODE 1. "Installation"



                             Installing Miami Control.

        You really should use the supplied installation script. This will ensure you
        have the required files installed.

        Miami should not be set up for auto online - Miami Control will not like this.
        It is also recommended you turn off Miami's GUI.

        You should also run SetCost, which will set up how much calls cost you in
        pence per minute (If you live outside the UK just enter the cost per minute
        in whatever currency).

        When you run it for the first time UK (BT, not including discounts) defaults
        will be set.

        For BT with Friends & Family and best Friend current call charges are:


               Peak Rate = 3.16   Evening Rate = 1.2   Weekend Rate = 0.8

        Or without discount:

               Peak Rate = 3.95   Evening Rate = 1.5   Weekend Rate = 1


        @{b}Note: If you are upgrading from a previous version of Miami Control, you must
        rename your old log! Typing the following into a shell will do:

        rename s:phonelog.log s:phonelog.log.old @{ub}

        If you don't do this, the log anyliser will not be pleased...

Uninstallation:

        If you wish to remove Miami Control simply run the Installer again.

        You should also delete the Environment variables if you don't want to use
        it again. To do this go into a shell and type:

        Delete Envarc:peakrate
        Delete Envarc:eveningrate       
        Delete Envarc:weekendrate
        Delete Envarc:peakratetimes
        Delete Envarc:mincharge

        A reboot will remove the variables from Ram, or if you want to do it
        manually for some reason, repeating the above commands with Env: instead of
        Envarc: will do.

        The log is s:phonelog.log.


Manual Installation:

        All that really needs doing is for you to copy returnrate to c:. If you want
        to set up your cost manually, that's it! Otherwise, make sure you have
        RequestString in c:

        You really should also go into Miami's prefs and make sure the GUI is
        disabled: GUI -> No GUI On Startup should be checked. NOTE: This goes for
        everyone, not just manual installers!

        You should also set it up in some sort of program laucher such as Tool
        Manager. Toolmanager has an option to run Rexx scripts directly, but
        others may need to have "rx" placed before miamicontrol.rexx.

If you want to set up your call charges manually (WHY!?!) click @{"here" Link 3.}.


@{" Introduction    " Link 0.}
@{" Requirements    " Link 4.}
@{" Usage           " Link 2.}
@{" Trouble Shooting" Link 3.}
@{" FAQ             " link FAQ}
@{" History / Future" Link 9.}
@{" Author          " Link 7.}

@ENDNODE

@NODE 2. "Usage"



                            Using Miami Control.

Going on and offline.

        Once you have everything set up, run Miami Control however you want. This
        will bring up a requester from where you can choose your options.

        If you wish to go online, load Miami Control and select Connect to confirm.
        Once Miami is online you will get a message telling you the speed at which
        your modem is connecting (if this constantly reports the port speed, add
        "W2" (No quotes, no "&" or "%") to your init string).

        If you wish to offline just do exactly the same and your modem should hang
        up. As I assume you know when your modem is off the hook you will get no
        confirmation from Miami Control, although it will get worried if it is taking
        a long time to disconnect, and give you a requester letting you do something
        about it.

        When you go offline you will also be told the length and cost of the last
        call. The price (in pence) will be logged to S:Phonelog.log after you click
        Disconnect, so the log will be fairly accurate (less handshaking time).

        There is a logfile anyliser in the Control menu.

Checkpointing:

        As of 2.22 Miami Control will not exit once you are online, instead it will
        hang around, and every two minutes log online time to s:mccheckpoint.tmp.

        In the event of a crash or dropped line, this file will not be deleted, and
        when you next run Miami Control it will give you the option to recover the file
        and log it (NB - this will be logged at current charge rate), or to simply
        ignore and delete it.

        This is currently what the ARexx port is used for - when you go offline with
        Miami Control it sends a message to the first copy to stop checkpointing. If
        there is a line drop, this message will not be sent, and the next time the
        first copy checks, it will stop checkpointing, and when you next run Miami
        Control you will get the option to recover the file.

        Date and time are also written to a file, so even if you do have a crash, this
        information will be logged normally.


Arguments.

        Miami Control currently has two arguments - CONNECT/S and DICONNECT/S

        DISCONNECT:
        I use this in my shutdown-sequence (which also quits Myzar, GoldEd, IBrowse and
        Yam :) to make sure my machine doesn't just drop the connection if I reboot/shutdown
        when I'm online. This has exactly the same effect as clicking on Disconnect when you
        run Miami Control - i.e. it logs your call and executes s:disconnect-sequence.

        CONNECT:
        Same as DISCONNECT, only it connects you :). It returns the connect string in a
        requester as normal.


Connect-sequence and disconnect-sequence.

        As of 1.61, Miami Control will execute s:connect-sequence and s:disconnect-sequence
        when you go on/offline. It is recommened you use Miami's built in ability to run
        scripts when this happens, but it's nice to have, anyway.

        I use them to force Myzar (a GUI for the @{"RC5" link RC5} client) to update as soon
        as I am online without it wasting time checking every 60 secs, and to quit AmIRC when
        I go offline.

        If you don't want to use them Miami Control will give you the option not to if they
        exist, or if you don't want to bother creating them at all the requesters will appear
        without any script options whatsoever.

        @{"Here is an example of my config. " link condis}


More advanced features.

        When you run Miami Control you will notice a third button - Control. Clicking on
        this will take you to the control menu for Miami. The buttons are thus:

                Quit: This will quit Miami, whichis handy if you are low on memory.
                      Unfortunately, as most low memory situations occur when you are
                      doing a lot of stuff online, the usefulness of this option is a
                      bit suspect :)

                Show: Shows Miami's GUI

                Hide: Hides it again!

                Kill GUI: Forces Miami to totally remove the GUI from memory.

                Anylise log: Reads the logfile and returns some information about it.

                Load New Settings: Brings up a file requester to let you choose a new
                                   Miami config file.


@{" Introduction    " Link 0.}
@{" Installation    " Link 1.}
@{" Requirements    " Link 4.}
@{" Trouble Shooting" Link 3.}
@{" FAQ             " link FAQ}
@{" History / Future" Link 9.}
@{" Author          " Link 7.}

@ENDNODE
@node condis "connect-sequence & disconnect-sequence"

        connect-sequence:

        This is ran only once you are online. If the connection fails for some reason
        it won't be.

        This will call ARexx and get it to check if the ARexx port MYZAR.1 exists, and if
        so send an UPDATE message to it.

        ****************************************************************************


        rx "if show('P','MYZAR.1') then do;address MYZAR.1;UPDATE;end"


        ****************************************************************************

        disconnect-sequence:

        This is ran just before you go offline.

        This does a similar thing with AmIRC - checks to see if it's running, and if so
        make it as if I'd typed "/quit Going offline..."

        ****************************************************************************


        rx "if show('P','AMIRC.1') then do;address AMIRC.1;'SAY /QUIT Going Offline...';end"


        ****************************************************************************

        You can use these to base your own scripts on, or you can just ignore this feature
        all together :)


@endnode
@node RC5 "RC5"

                                        RC5

        RC5 is an encryption alogorithem, basically meaning it makes a message unreadable
        without a "key". The RC5 effort, known as Bovine (as in the farm animal ;) is an
        attempt to break this encryption.

        What does this have to do with the Amiga?

        Well, the Amiga has a team in this effort, in order to publicise the Amiga and show
        that we are still around. The Amiga team is, as I type, in 6th position, out of
        @{b}thousands@{ub} of teams.

        If you are interested (and want to join - please do!) visit:

        http://homepages.cistron.nl/~ttalvoy/rc5/

        For PPC owners, this is mandatory ;)


@endnode

@NODE 3. "Trouble Shooting"



                                  Trouble Shooting.

Unable to create ARexx port:
        The ARexx port is essential to checkpointing. If you try to load more than two
        copies of it at once - e.g. you go offline, then online again, then offline, it
        will complain. If you get this message, it is strongly recommended that you wait
        a minute or so for the checkpointing copy to finish - remember it only checks for
        a connection, or for quit messages from another copy of Miami Control every two
        minutes. You should be alright, but you won't get any checkpointing, and other
        strange/irritating behaviour might result... although I doubt it.


The log anyliser doesn't work!:
        Did you remember to rename your old log?

        If so, then load it into a text editor and check it for problems - mainly ensuring
        that the costs table only contains numbers. If it doesn't, contact me - you just
        found a bu... sorry, undocumented feature :)

SetCosts:

        The main reason setcosts may fail is because you don't have the
        RequestString program installed. This is included (details
        in the @{"RequestString readme" link 10} in this guide, and the
        file RequestString.readme. I didn't make it!!!)

        When you run the Installer this is installed.

        If you are not using the included version, SetCosts may not work properly.
        If you don't want to use it, you can set it up manually.

        To do this, type the following into a shell:

        Echo "penceperminute" >Envarc:peakrate
        Echo "penceperminute" >Envarc:eveningrate
        Echo "penceperminute" >Envarc:weekendrate

        Setting peak rate times is slightly more diffcult:

        Echo "StarthourEndhour" >Envarc:peakratetimes

        @{b}Each hour absolutely must have 2 digits,@{ub} so if peak rate starts at 8:00
        and ends at 18:00 (yes, you must use the 24 hour clock) you type:

        Echo "0818" >Envarc:peakratetimes

        If you have HappyEnv installed (you should!), this will do. If not, you
        will either have to copy the files created in Envarc: to Env: or reboot.

@{" Introduction    " Link 0.}
@{" Installation    " Link 1.}
@{" Requirements    " Link 4.}
@{" Usage           " Link 2.}
@{" FAQ             " link FAQ}
@{" History / Future" Link 9.}
@{" Author          " Link 7.}


@ENDNODE
@node 10 "RequestString.readme"

RequestString                                                   RequestString

   NAME
        RequestString

   VERSION
        RequestString 39.0 by Thomas Kessler (12.08.94)

   DISCLAIMER
        RequestString ©1994-96 Thomas Kessler (kessler@fen.baynet.de)
        All rights reserved.

        RequestString uses 'reqtools.library' V38+
        ©1991-1994 Nico François, ©1995-1996 Magnus Holmgren
        available on aminet: util/libs/ReqToolUsr.lha

        This software is EMAILWARE (Freeware).
        Please send me a small email if you like and use this program.

        This software is provided as-is, without warranty of any kind,
        either expressed or implied. In no event will the author be liable
        for direct, indirect, incidental or consequential damages or data
        loss resulting from the use or application of this software. The
        entire risk as to the results and performance of this software is
        assumed by the user.

   FUNCTION
        RequestString is very similar to RequestChoice and RequestFile
        which are included in the Workbench 3.x release.

        It allows the user to enter some text which is then printed to
        StdOut. You can redirect that output to whereever you want,
        e.g. to an environment variable or to any other file.

        It is 'pure' so it can be made resident.

   SYNOPSIS
        RequestString TITLE/A,BODY/A,STRING/K,PUBSCREEN/K,NOLINE/S,
                       NOQUOTE/S,NOEMPTY/S,PASSWORD/S,REQPOS/K

        TITLE (required)   titletext of requester

        BODY (req.)        text in the requester to explain to the user
                           what to do... more textlines can be realized
                           by using '*N' for a linebreak

        STRING (optional)  given text which can be changed by the user
                           default: empty

        PUBSCREEN (opt.)   name od a public screen to open the requester on
                           default: Workbench

        NOLINE (opt.)      no linebreak after text at output to StdOut
                           default: linebreak

        NOQUOTE (opt.)     no quotes around text at output to StdOut
                           default: text returned in "quotes"

        NOEMPTY (opt.)     if no string is entered RequestString returns with
                           returncode WARN instead printing an empty string
                           default: empty string is valid

        PASSWORD (opt.)    entered text is invisible, but output to StdOut
                           is of course VISIBLE!
                           default: visible

        REQPOS (opt.)      override the default-prefs of ReqTools
                           REQPOS=CENTER centers the requester on screen
                           REQPOS=POINTER opens the requester near to pointer
                           default: ReqTools-Prefs

   EXAMPLE
        RequestString "Titletext" "Please enter*Nsomething:" REQPOS=POINTER

   HISTORY
        1.0 (12.08.94)   first public release
                         (to Aminet in 12/96)

   DISTRIBUTION
        Distribution on Aminet and AminetCDs is allowed.
        Distribution by Fred Fish is allowed.
        Distribution on MeetingPearlsCDs is allowed.

        You are allowed to include RequestString in your own projects as
        long as they are Freeware. This RequestString.readme MUST also
        be included!

        Other distribution without written permission of the author is
        strictly forbidden (contact me via email).


@endnode

@NODE 4. "Requirements"
                            Requirements.

        Miami 3 (3d reccommended)

        rexxreqtools.library (Included and checked for by installer)

        rexxsupport.library (ditto)

        Internet account - Duh! :)


@{" Introduction    " Link 0.}
@{" Installation    " Link 1.}
@{" Usage           " Link 2.}
@{" Trouble Shooting" Link 3.}
@{" FAQ             " link FAQ}
@{" History / Future" Link 9.}
@{" Author          " Link 7.}


@ENDNODE

@NODE 7. "Author"



                                    Author.


                                 @{b}Thomas Hurst@{ub}

                              @{u}tom.hurst@clara.net@{uu}
                            tom_hurst@geocities.com
                                 ICQ: 17701673

               "Freaky" on ARCNet #Amiga, usually around 19:00 UT

                          Webmaster (ahem) of AmiSITE:
            @{b}http://surf.to/amisite@{ub} -> http://www.tom.hurst.clara.net
                http://www.geocities.com/SiliconValley/Lab/1820/


        Thanks also to:
            My beta testers:
                    Paul Ferguson
                    Andrew Cashmore
                    Ian Urie
                    Tommy Eliassen
                    Graeme Wakerley
                    Blasio Muscat
                    Geoff Milnes

            And:
                Lanky for getting me to write an ARexx version :)

                Holger Kruse (of course), for writing Miami, and for letting me use Miami's
                                                                                    icon.


                              Miami Control is E-Mailware!

        If you use Miami Control, or even if you hate it, you should send me an
        e-mail to tell me what you think of it.


        SetCosts uses @{"RequestString" link 10} by Thomas Kessler.

@{" Introduction    " Link 0.}
@{" Installation    " Link 1.}
@{" Requirements    " Link 4.}
@{" Usage           " Link 2.}
@{" Trouble Shooting" Link 3.}
@{" FAQ             " link FAQ}
@{" History / Future" Link 9.}

@ENDNODE

@NODE 9. "History"


                               History


        0.1 - 0.2 (03.09.98) : Internal. Went on/offline. Untested.

        0.3 (04.09.98) : Another internal release : Rudimentry support for call charges

        0.4 (04.09.98) : Yet another... It now supports easy changing of call charges.

        0.5 (05.09.98) : Internal...  Few bug fixes (now deals with non integer
                                   call charges). Still doesn't work as it should
                                   though.

        0.6 (06.09.98) : Intern...  Found out what the problem is. Found some
                                 more... all my fault :(
                                 Thanks to Holger Kruse for his help.
                                 First working version... ahem.

        1.0 (06.09.98) : It works!!!

        1.1 (07.09.98) : First release! Now whenever you are online you get the cost 
                         of the call automatically when you run it. Slows it down,
                         but I don't care ;)

        1.2 (19.09.98) : Small update - you no longer need to run Miami from startup.
                         It will not be quit when you go offline, however.

        1.3 (21.09.98) : Internal - Miami Control now has a bit of C in it! It also
                         now counts the first minute and a minimum charge (Thanks to
                         Jorgen Sjobom for pointing that out - I would probably not
                         have noticed otherwise!).

        1.4 (23.09.98) : Times when peak rate starts and finishes are now user set.
                         Env variables may be placed in their own directory to avoid
                         cluttering up Envarc: in future - we are already up to five!
                         Failing this, a custom file instead of several text files
                         may be used... have to see what 1.5 holds :)

        1.4 (24.09.98) : ARRRRGGGGHHHHHHHH!
                         SetCosts doesn't work any more!! It worked perfecty yesterday
                         but now it just brings up an empty box... NOOOOOOOOO!

                         I've also found a bug in setrate - it doesn't work properly!

                         @{b}WHY!?!?!@{ub}   :(
 
        1.5 (24.09.98) : (Sigh)
                         Got everything working again. A version of RequestChoice I
                         know works has been included and the installer updated as
                         required.
                         Fixed the bug in setrate - a ">" should have been ">="

        1.6 (25.09.98) : Code cleanup - down to just two files now...

        1.7 (27.09.98) : Now executes two scripts when you go on and offline:
                        s:connect-sequence and s:disconnect-sequence.
                        Also has two arguments - ONFLINE/S and OFFLINE/S

        2.0 (27.09.98) : Total rewrite! It is now enirely in ARexx, and a small bit of C.
                         Usage is almost identical to older versions, but a hell of a lot
                         faster :)
                         Running of connect and disconnect scripts are now optional, even if
                         they exists (it will ask you, instead of just running them if they
                         exist)

        2.1 (28.09.98) : Added support for multiple config files.

        2.11 (29.09.98): Small update - now shows connect speed when you are online and
                         you want to go offline. Note: As I write this, the latest public
                         version is 1.2.... must get 'round to releasing it!

              30.09.98 : Released 1.7 to Aminet
                       : Got some @{"beta testers!" link 7}

        2.12 (01.10.98): Fixed a LOT of bugs - forgot to add "end" to all my select statements.
                         To coin a phrase: @{b}DOH!@{ub}

        2.14 (02.10.98): Now returns minutes and seconds of connection time, and more useful
                         call costing. Removed return rate.

        2.22 (10.10.98): Introduced better logging  - now contains date and a small header.
                         Online checkpointing intoduced, along with a basic ARexx interface
                         used for checkpointing.

        2.26 (14.10.98): Introduced even better logging! Now includes connection and disconnection
                         date and time.

        2.30 (15.10.98): Now includes log file anyliser. Fixed typo that stopped checkpointing
                         working properly.




                                Future

o      Put all env variables into one file.

o       Re-write SetCosts in ARexx to get rid of need for Request String.

o       A GUI using MUIRexx would be possible, and quite cool, I think.
        Note: This WOULD be optional, so don't compain about this negating
        the point! The reason I wrote MC in the first place was because Miami's
        GUI was too big in terms of size - not in terms of it loading MUI libraries
        into memory, which most Internet apps do anyway...

o       AmiTCP/Genesis version - Unlikely to be fully featured though, due to
        limitations of it's ARexx port.

o       Option to prevent connections during certain call rates.

o       Your ideas?


@{" Introduction    " Link 0.}
@{" Installation    " Link 1.}
@{" Requirements    " Link 4.}
@{" Usage           " Link 2.}
@{" Trouble Shooting" Link 3.}
@{" FAQ             " link FAQ}
@{" Author          " Link 7.}

@ENDNODE
