@database MegaBook.guide
@master MegaBook:Docs/MegaBook.guide
@author "Tom Bampton"
@(c) "© 1996,1998 Eden Developments"
@index Index

@node "main" "MegaBook Version 4.1    Documentation      Contents"

                           MegaBook Version 4.1
                              By Tom Bampton

                       © 1996,1998 Eden Developments
                       
          ... When the best isnt good enough, choose MegaBook ...

 Section 1 - Introduction
 
 @{" 1.1 Introduction         " link "intro" 0}
 @{" 1.2 System Requirements  " link "sysreq" 0}
 @{" 1.3 Legal Stuff          " link "legal" 0}
 @{" 1.4 Registration (Free!) " link "reg" 0}
 @{" 1.5 Distribution         " link "dist" 0}
 @{" 1.6 Installation         " link "inst" 0}
 @{" 1.7 Using This Guide     " link "guide" 0}
 @{" 1.8 Release Notes        " link "rnotes" 0}
 @{" 1.9 Upgrading            " link "upgrade" 0}
 
 Section 2 - Useage
 
 @{" 2.1  The First Time      " link "first" 0}
 @{" 2.2  The Windows         " link "windows" 0}
 @{" 2.3  Records             " link "records" 0}
 @{" 2.4  Navigation          " link "nav" 0}
 @{" 2.5  Loading             " link "load" 0}
 @{" 2.6  Saving              " link "save" 0}
 @{" 2.7  Searching           " link "search" 0}
 @{" 2.8  Printing            " link "print" 0}
 @{" 2.9  Settings            " link "prefs" 0}
 @{" 2.10 Menus               " link "menus" 0}
 
 Section 3 - ARexx
 
 @{" 3.1 Database Commands    " link "rxdata" 0}
 @{" 3.2 Requester Commands   " link "rxreq" 0}
 @{" 3.3 Example Scripts      " link "rxexamp" 0}
 @{" 3.4 Writing scripts      " link "rxtec" 0}
 @{" 3.5 Special Scripts      " link "rxsp" 0}
 
 Section 4 - Extras
 
 @{" 4.1 Introduction         " link "xintro" 0}
 @{" 4.2 Voice Dialing        " link "xvoice" 0}
 @{" 4.3 Data Dialing         " link "xdata" 0}
 @{" 4.4 Sending Faxes        " link "xfax" 0}
 @{" 4.5 Sending EMails       " link "xmail" 0}
 @{" 4.6 Extras Storage       " link "xstore" 0}
 @{" 4.7 Writing scripts      " link "xscript" 0}
 @{" 4.8 The MBIO System      " link "mbio" 0}  External loader/savers
 
 Section 5 - Credits and Contacts
 
 @{" 5.1 Credits              " link "credits" 0}
 @{" 5.2 Contacts / Support   " link "contacts" 0}
 @{" 5.3 Eden Developments    " link "eden" 0}
 
 Section 6 - Just for fun
 
 @{" 6.1 Funny Bugs           " link funny 0}
@endnode

@node "intro" "1.1 Introduction"

Welcome to the new and almighty MegaBook 4.1 ! MegaBook is now almost
complete, except for a couple of things, and its better then ever!
All of the old code has now been ironed out, the prefs system vastly updated,
hundreds of new features, and much improved ARexx support. That is not all,
but this originally small project is now so huge I cant list all the features.

Also included now is MiniBook, a slightly updated version of the original
PhoneBook which was what gave birth to MegaBook. MiniBook is included for
when you want to just store names and phone numbers simply without all the
frills. 

For those that dont know already, here's the original intro ...

MegaBook 4 is a very fast and powerfull Address Book program. It has been
designed to be simple to use yet extremely powerfull and flexible whilst
still being fast. We doubt you'll ever need this guide file but some things
will need explaining, such as the extras and ARexx port.

You can get support on MegaBook by sending an email to
megabook@dvalley.demon.co.uk, and someone (most likely me) will give you a
hand.
@endnode

@node "sysreq" "1.2 System Requirements"

MegaBook 4 requires OS 2.04+ to run. There is 2 versions of it, a standard
one which will run on any processor and a 68020+ optimised one. At this time
there is no 020 version of other binaries supplied with MegaBook, because
the speed increase on an 020 version was so small it wasnt worth it.

You'll also need reqtools.library in libs: and rexxsys.library if you want
to use ARexx (more or less required if you want to use the extras). You'll
also need RexxMast running. If you want to be able to use crunched files,
you will need the powerpacker.library version 35 or later. 

@endnode

@node "legal" "1.3 Legal Stuff        "

@{b}DISCLAIMER@{ub}

You use MegaBook at your own risk. Neither I or any other member of Eden
will be held liable for any damages caused acidentally or otherwise. It is
provided 'as is' with no warranties of any kind.

@endnode

@node "reg" "1.4 Registration"

Registering MegaBook is fast and above all @{b}FREE!@{ub}

You can use the supplied ARexx script (RegisterMegaBook.mbrx) to create the
application form to send to me. This has been updated over the previous
version, and will now send the mail itself without any external help. If
you cant, for whatever reason, use this script, then a text file containing
the form it fills in is included in this directory. Simply fill out the form
and send it to megabook@dvalley.demon.co.uk with the subject as Register
MegaBook.

You can run the registration script either by using the Execute Rexx.. menu
option and selecting the script, or the much easier Register MegaBook 
option in the Extras menu. The shortcut is Amiga-# and no you dont get
any hash for registering ;-)

@endnode

@node "dist" "1.5 Distribution         "

MegaBook may be freely distributed as long as no files are removed or
changed in any way. You may not charge more then the cost of media and
postage for MegaBook. This may not excede $5 US, or the equivalent in your
local currency.

I ask that if you include it on a magazine, you let me know (or preferably
send me a copy of the magazine). Id also like to know if it's reviewed
anywhere, even if you think its crap :)

@endnode

@node "inst" "1.6 Installation"

MegaBook 4 is very easy to install through the Install script provided.
You'll need a copy of Installer which hasn't been supplied here because of
copyrights. You can obtain the latest version from the Aminet or you can find
it on your Workbench install disk.

The installer is quite easy to use but may need a bit of explaining. Help
is available at all times during the installation process.

If you have a modem, you'll be able to use the powerfull extras system in
MegaBook (even if you dont, you can still use some of it).

The installer will automatically setup the system for you by copying the
correct scripts for your software. See section @{"4.1" link "xintro" 0} for more information.
@endnode

@node "guide" "1.7 Using This Guide     "

This guide has been organised into sections to make it easier to use. Simply
scroll down to the section you want and click on the link to the subject you
want. There, simple.

Even if you don't read the 'Useage' section, please read the 'Extras'
section as it contains vital information to customizing the Extras to your
liking.

Ongoing through the Useage section is a mini-tutorial on the various parts
of MegaBook. The file created in the tutorial is provided in the Examples
directory under Tutorial.mb

@endnode

@node rnotes "1.8 Release Notes"

These notes cover the various bug fixes and improvements over the years. 
My appologies for them not being complete, I only started taking proper
release notes around 4.0 beta 8.

MegaBook 4.1 Beta 3 and Release:

Updated MBIO specifcation: 4.0 MBIOs WONT work with 4.1

Added printing for Country

Extended file format for new Country field (old files can still be loaded)
Files without Country fields will be saved in the MegaBook 4.0 format

Extended Put_Entry & Get_Entry commands. 9 as the field # will set/get the
country field.

Updated LoadOld, PrintLabel and FrontSheet ARexx scripts for the extended
ARexx commands.

Fixed a couple of display bugs when saving files. The messages in the title
window were wrong and it wasnt reset. 

Updated Macro Recorder for new ARexx commands

MegaBook will now save in recorded scripts whatever version of MegaBook you're
using as the version to start if it isnt loaded. i.e:

MegaBookPath = 'MegaBook:MegaBook'

or for 020 version

MegaBookPath = 'MegaBook:MegaBook-020'

When you crunched files, it used to show an error even if crunching
succeded. Fixed.

MegaBook 4.1 Beta 1 and 2:

Added ARexx commands SelectPrj, NextPrj and PrevPrj

MBIOs with preferences now allow prefs to be used.

Totally revamped GUI:
  Removed buttons from Edit Window and added Country field
  Added two new ToolBar buttons for Add and Delete
  Added "Default" button to the Field Editor
  Added "Size" display to the Notes Viewer
  Changed Prefs window a bit
  Added Country to Print window.

Added two new settings: Font and Use System Font, both self explanatory

Added URL field to the optional fields.

Updated Set_Type ARexx command to allow URLs

Added out-of-date preferences requester. This warns you if your prefs file
is out of date and tells you to read the release notes.

MegaBook 4.0 Beta 12 and Release:

Added external loaders/savers support (called MBIOs). MegaBook's formats
will continue to be supported internally, with the MBIO
system allowing for extensions. In the next version only MegaBook 4's format
will be internally supported, with the rest being implemented as MBIOs.

FINALLY fixed the problems with the Window menu and Notes not working when
the new window was activated immediately after an open (no users saw this
as it only did it when I activated the window from the code). However, it
still wont do it because a silly new bug has shown up where the notes from
the last record you were viewing/editing in the previous database are used
till you click the window. Once again, I cant find it :/

When you open a file and there is no records in a window, then it will reuse
that window and act as if you used Load instead of Open.

Notes can now be printed. This is untested, Id appreciate some feedback on
this.

Removed some redundant code from add records. Memory was being zeroed twice,
so it (theoretically) slowed down adding records and loading files.

Fixed a crash when you closed a project when more then one was open. This
has been there in varying degrees since about Beta 3, but I could never
find the problem before. Turned out to be some old code I wrote in the
first Beta and forgot to update when i updated the project manager.

Fixed a bug with the find window. If you clicked the find button on the
toolbar twice quickly it would open two windows and the first would become
dead, which meant MegaBook wouldnt quit properly and you'd need to reboot
to get rid of the window and screen.

MegaBook 4.0 Beta 8 thru 11:

Locale mostly done now

Fixed nasty bugs with notes

Added Edit facility from Notes Viewer, which also highlighted dangerous bugs

Database handling is much safer now

Added Last Saved menu option (or rather, added code for it)

Rearranged menus and renamed Prefs to Settings

Added Sort and Field Names menu options

Added Field Name editor

Internal file loaders updated for new internal database structures

Fields added to prefs structure for field edit window snapshotting, field
names and also future area for user registration information.

Added Notes gadget to Print window. Notes arent printed yet, though

Fixed registration script, thanks to nicholas@IRC for the SendMail() proc


MegaBook 4.0pr is the MAJOR update to the old version 3.x a summary of the new
features is included here for your reference, note this is just a summary,
its not a complete list.

 o You can now have multiple projects open at once

 o More file format supported

 o Unlimited notes can now be stored for any or all of the records

 o Optional MagicWB look toolbar

 o Many new ARexx commands

 o ARexx Macro Recorder will make ARexx scripts for you

 o Can load/save powerpacker crunched files, in any format supported by MegaBook

 o Records can now be moved withing the database
 
 o Every single window opened by MegaBook can now be snapshotted
 
 o New, more flexible Settings format

MegaBook 3.2 is a minor bugfix to 3.1 with some new features too.

NOTE: You _MUST_ use the samples in this archive for voice dialing as the old
ones had an extra chunk which _CRASHES_ MegaBook's sample playing code!

New Features in MegaBook 3.2

 o All (i hope!) bugs now fixed
 
 o Iconify window can now be snapshotted
 
 o A couple more ARexx commands have been added
 
 o Voice dialing is now completely internal, no need for that external sample
   player now.

@endnode

@node "upgrade" "1.9  Upgrading"

This is a general guide to upgrading MegaBook from pre-version 4.0 and
the preview releases. This attempts to outline the most common problems
encountered, it does not outline all of them. You may encounter other
problems along the way that have not been mentioned here. As a general rule
tho, most updates are invisible to the user and you will be told everything
that happens if an update is necessary.

@{b}IMPORTANT:@{ub} You can NOT use the MBIOs from V4.0 with MegaBook 4.1,
also quite a number of other things have changed. You should do a full
install with MegaBook 4.1 WHATEVER version you are upgrading from.

If you are installing MegaBook 4.0 as an upgrade to a previous version,
there are a few points you should be aware of. If you're upgrading from
version 3.3 or below, then you should do a full install. Be sure to save
all your files and arexx scripts before you do, as these can be used with
MegaBook 4. If you are upgrading from MegaBook 2.1 or below then you MUST
do a full install, as a LOT has changed since then. The same applies on
data files, you can use those with MegaBook 4 as well. For info on upgrading
from MegaBook 4 Preview releases, please read on. 

When you are upgrading your MegaBook, there are a few important things to
note. The main 3 parts of MegaBook that change from release to release are
generally Settings, File Formats and the ARexx port. Obviously, a lot of
other parts change too, but these do not usually effect upgrading. 

@{b}Preferences@{ub}

Unfortunately, the preferences need to be changed a lot more regularly then
any other part of the program, as they need to accomodate new features.
Up untill MegaBook 4.0pr1 (the first preview) the prefs file had enough
room for future expansion and could accomodate changes easily. Thusly, all
preferences from V2.0 to V4.0pr1 could be used and upgraded invisibly to
the user. When pr2 was being developed, some changes were made that meant
the preferences had to be partially rewritten. This was mainly due to old
code being messy and not very concurrent. When these changes were being made
a few bugs showed up from early versions of MegaBook ... these never caused
a problem, untill I had to make drastic changes to the prefs format. The
amount of new features I added meant that there was no room left in the
prefs structure and the old code was falling over. Therefore, I decided to
rewrite the whole prefs system. Version checking is now done and updates
from pr2 to newer formats will now be invisible, however people upgrading
from earlier versions of MegaBook (including pr1) will need to set their
prefs all over again. You will be warned if this happens, and MegaBook will
just use the defaults.

@{b}MegaBook 4.0R Note:@{ub}

You should now do a full install as more important things have been added.
I suggest you backup your old ARexx directory as the example scripts will
be overwritten by the Installer.

@{b}File Formats@{ub}

The only time these change is usually between major versions (i.e. V3 -> V4)
to accomodate new fields or information. MegaBook 4 will load all MegaBook's
previous file formats. In designing MegaBook 4's file format, a lot of
MegaBook 3's format was used, but was extended to allow future expansion
easy. The file format now has an internal version number that can reflect
minor changes in the format between versions. This means that the format is
a lot more forgiving and updates to your current files is invisible, as they
will just be converted to any new format next time you save them.

@{b}ARexx@{ub}

MegaBook's ARexx port usually only changes to add commands for new features
or to update existing ones. You should always read the ARexx section if your
intending to use the ARexx port with any scripts except the scripts
distributed, as the functionality of the commands may change. For example,
in MegaBook 3.x the New command erased the current file from memory. In
MegaBook 4.0, the New command opens a new file and leaves the current one
intact. When upgrading you should always copy the distribution ARexx scripts
over your old scripts that were distributed with MegaBook. You will have to
check other scripts by hand and make any necessary changes. 

@{b}Other Problems@{ub}

As mentioned above, any other problems will usually result in you being
asked or told something about the problem, and it will be fixed automatically.
If for some reason the problem doesnt go away, please contact MegaBook
@{"Support" link contacts} for help if you cant fix it. 

A common problem in between preview releases and some betas is MegaBook
failing to run. In pre-preview2 releases, nothing happened. What this is
is the preferences format being out of date and the screen and window
information being in a different place, causing incorrect information
being given to OpenScreen() and OpenWindow() calls. This manifests itself
as either a complete crash (only happened to me once, and not to anyone
else) or just nothing. In preview2 and after, error messages will tell
you what exactly went wrong. If you want an example of this, try running
preview1 or MegaBook 3.x with a MegaBook 4.0pr2 prefs file. The easiest
solution to this is to delete the prefs file from ENV:MegaBook/ and
ENVARC:MegaBook/

@endnode

@node "first" "2.1  The First Time      "

The first time you run MegaBook 4, it is likely you wont have a prefs file.
MegaBook will inform you of this and ask you if you want to create one. If
not, the defaults will be used and you'll have to save the prefs yourself.

After the prefs have been saved (either by MegaBook or by selecting the
'Save Settings' menu option) you should immediately customize it with the Settings
window. Even if you don't change anything, you should change the default
editor as Ed is pretty crap. 

The File Converter has now been removed, as it's unnecessary due to the new
MBIO system. MegaBook itself can now be used to convert between many file
formats.

@endnode

@node "windows" "2.2  The Windows         "

MegaBook 4's layout has changed a lot over the previous version. As well
as the Edit window and ToolBar, there are a number of other windows. All
are very self explanatory.

MegaBook 4.1 sees yet another major GUI change. Everything is more or less
in the same places, it just looks slightly different and the toolbar has an
extra two buttons: Add and Delete, as these were removed from the Edit
window to make room for the Country field. 

@endnode

@node "records" "2.3  Records             "

Editing records in MegaBook is very easy. The Edit window is where all 
editing and viewing takes place, it contains eight string gadgets for
entering details, two cycle gadgets for choosing what goes into the last
two fields, two buttons for editing or viewing notes, a listview which shows
the whole database by the names of the people in it, and a further four
buttons to add, delete, or move records.

To demonstrate how to add, edit and delete records we'll use a little
example. Start MegaBook, if you dont have a startup Arexx script then you
should get a blank database and the toolbar. The display may be different
if you have a startup arexx script. If the Edit window is showing
information, select New from the Project menu to get a blank one. 

We will now add a record to the database and put some information into it.
Click on the Add button at the bottom left of the Edit window, or select Add
from the Record menu. Depending on what you have set in the preferences,
you will either get a record full of instructions or a completely blank one.
If you dont want to see the instructions every time you add a record, see
the Settings section for how to turn it off.

After clicking on Add, the Name gadget will become active so you can type in
it. If there is text in the box, press Ctrl+X to clear it all. The same goes
for all the other fields, but I wont repeat that. Type in a name. Now press
Tab or Enter to move to the next field. You will see the list change to
reflect the new name in the record. Continue typing the address untill you
reach the last field, where it says Fax. We're not in fact going to enter
a Fax number, we'll enter an EMail address. Enter an Email address in the
string box and press enter. Now click on the Fax cycle gadget untill EMail
appears in it. 

Now we will enter some notes. To do this, you will of had to set an editor
in the preferences. Please see the preferences on how to do this. MegaBook
defaults the editor to C:Ed, this tutorial will assume this for now. If
you've set the editor to something else, then I excpect you know how to use
the editor.

Click on the Edit button underneath the string gadgets, next to where it
says Notes. When the editor appears, type in some whiticism about this
entry. Now save the file using the filename the editor was given, and quit
the editor. In Ed you can just press Escape then x then press return. You
will now be returned to MegaBook to continue with what you're doing.

Click on View to view the notes you just entered. Currently the viewer
doesnt wordwrap, so you may have to re-edit the notes to get them to fit.

Congratualtions, you just created your first record ... that wasnt too
difficult was it ?

Now create a couple more. For clarity's sake, Ill refer to the three records
with the names Joe Bloggs, Ivor Biggun and Dr Jekhyl. In the list window,
select Dr Jekhyl. We're going to move him up to the top. Click on Move Up
twice to move him to the top. Now lets move Joe Bloggs to the bottom. Click
on his name and click on Move Down once. 

Create a new record, then click on Del to delete it. You will be prompted
before the record is deleted, if you decide you dont want to delete the
record after all simply click on No and it will be left alone.


@endnode

@node "nav" "2.4  Navigation          "

Navigation within the database is simplicity itself. You can use the Next,
Prev, First, Last or Goto items from the Record menu or use the
gadgets on the Tool bar. Alternatively, you can click on the name of the
entry in the list to jump straight to that entry.

@endnode

@node "load" "2.5  Loading             "

To load a pre-saved database, either select the Open menu item from the
Project menu or click on the Load gadget on the ToolBar. A file selector
will open and you can select the file to load. If you dont want to create
a new project for the file, use Load from the Project menu instead. If a
file is already loaded in the window it will ask you if you want to overwrite
or merge the files.

If a file is crunched, it will automatically be decrunched, regardless of
the Settings. 

File Formats are automatically identified, and the appropriate loader will
be selected for the file format.

@endnode

@node "save" "2.6  Saving              "

Saving is the same as Loading except you click on Save. If you want to save
the file under a new name, select Save As.. from the project menu. The Save
button on the ToolBar is equivalent to Save As MegaBook 4. To save the
file under the same name, select the Save item from the Project menu.

In the Save As menu there are four different file types. These correspond
to every previous version of MegaBook, including MiniBook and PhoneBook.

Also in the Save As menu there is an option called Other. This allows you
to save in a different format using an external saver. The actual list
depends on what MBIOs you have installed. Simply click on the file format
you wish to save in and click on Save.

@{b}Note:@{ub}

Not all MBIOs will allow you to save files. You will be warned if the format
you select does not allow saving.

@endnode

@node "search" "2.7  Searching           "

Select the Find menu item from the Search menu or click on the Find gadget
on the ToolBar. This will open a Find requester (NOTE: while the find
requester is open, you can still use the rest of MegaBook!)

Enter the text you want to find into the Find string gadget then select you
find options. When checked, Case Sensitive will make the search case
sensitive. It defaults to Off. You can search in reverse by unchecking the
Forwards checkbox.

When done, click on Find.

You can leave the Find window open if you like and just click on Close or
the closegadget when you've finished with it.
@endnode

@node "print" "2.8  Printing            "

Click on the Print gadget or select Print from the Project menu to open the
Print requester.

You can omit fields from the print by unchecking the corresponding checkbox
gadget. NOTE: Opt 1 refers to the first selectable field and Opt 2 refers to
the second.

You can also select which records you want printing by setting the MX gadget
to either All or Range. If you want a range of records, enter it into the
First and Last gadgets. These by default contain the First and Last record
numbers but you may change them to suit your needs. If you enter an out of
range number, it doesn't matter as MegaBook will recognise this and correct
it for you. It will also flash the screen to warn you of the changes. Note
that this only happens if Return or Tab is pressed in the gadgets but it
will still only print within the range if it detects an out of range number
at print time.

If you dont want to print afterall, select Cancel else click on Print and
the records you selected will be printed.

@endnode

@node "prefs" "2.9  Settings         "

From the Settings window, you can alter a number of ways MegaBook looks and works.

You can have it open on it's own screen or on the Workbench screen. If
Open on Workbench is checked, the Screen Mode gadget will be ghosted to stop
you using it. If you want your own screen, click on the Screen Mode button
and select your screen mode.

From MegaBook 4.1 you can now change the Font MegaBook uses, whether on
its own screen or on Workbench. If "Use System Font" is checked, then
MegaBook will use the default system font. This is turned on by default.
If you uncheck it, you can change the Font MegaBook uses by clicking on
the "Select Font" button.

If Create Icons for data files is selected, MegaBook will make an icon for
each datafile. If the file ENV:MegaBook/def_project.info exists, it will
use that icon otherwise it will use its own internal default.

To change the notes editor, select the Editor button. You need to do this
before you can edit notes. The current selection will be shown beside the
gadget.

If you dont like MegaBook filling the records with instructions when you
create new records, deselect Fill Text to turn it off.

If you want to crunch files when you save them, select Crunch Files. Note
that you need powerpacker.library to use this. 

To get a MagicWB style toolbar select MagicWB Look. If MegaBook is on its
own screen it will need to be in 8 or more colours. MegaBook will
automatically adjust the screen display if you set it wrong with this option
selected. If on Workbench the same restrictions apply, plus that Workbench's
first 8 colours should be MagicWB colours (otherwise the toolbar looks
gastly). MegaBook makes no attempts to adjust the Workbench screen, thats
upto you. 

To save the prefs, click on Use then Save Settings from the Settings menu. If you
decide you dont want to use these changes after all and you've already
clicked on Use, simply select Last Saved from the Settings menu and your
settings will be reloaded from envarc: 

If you'd like to change what the field names are displayed as, you can use
the Field Editor which can be accessed from the Settings menu. Simply change
the names in the string gadgets then click on Use. Currently this effects
all of MegaBook, however a per-project field thing will be done soon.
@endnode

@node "menus" "2.10 Menus               "

Yes, I *still* havent done this section. Its very unprofessional of me and
i just dont care :) Seriously, it will be done soon ... I just need to get
MegaBook out ASAP.

@node "rxdata" "3.2 Database Commands    "

FIRST, LAST, NEXT, PREV

  As they say, they jump about the database.

DEL_ENTRY [no_confirm]

  Delete current entry

ADD_ENTRY

  Adds a record. You can change its contents with PUT_ENTRY.

NEW [no_confirm]

  Create new project, removing current one

OPEN [file]

  Open a new project. If file isn't specified then a file requester will
  pop up and the user must specify a file. Requesters will NOT appear when
  loading a file thru ARexx apart from when you don't specify a file. You
  can not merge files when opening a file by specifying a name from the
  script.
  
MERGE <file>

  Same as Open but adds the file to the end of the project. This was added
  because of the lack of Merge in the OPEN command when specifying a file.
  Merge WONT open a file requester when used with no arguments, it will just
  return 5. If you want a file requester for the merge, use OPEN with no
  args instead. Requesters wont appear with the MERGE command either.
  
SAVE

  Save current project

SAVEAS [file]

  Saves project under a different name, if file isn't specified then a
  requester will pop up.

FIND <string>

  Searches for string in project. RC will be 0 on success and 5 on failure.

GET_ENTRY <field>

  Gets data from the current entry. Field is one of:
  
   1: Name
   2: Address
   3: The blank field
   4: Town
   5: County
   6: Postcode
   7: Fone number (may be different, depends on cycle gadget)
   8: Fax number (may be different, depends on cycle gadget)

  RC will always equal 0 with this. result will contain the contents of the
  requested field.

PUT_ENTRY <field> <text>

  Changes the data in the current entry. field is a number from above and
  text is the string to change it to.

SET_TYPE <field> <type>

  Sets the type of the selectable fields. field is either 1 or 2. 1 is the
  first, 2 is the second. type is one of:
  
  1: Tel
  2: Fax
  3: Home
  4: Work
  5: EMail
  6: Data

GET_TYPE <field>

  Gets the type of the selectable fields. field is either 1 or 2. 1 is the
  first, 2 is the second. Returns in RC a number as above for Set_Type.

PRINT <text>

  Sends text to the printer.
  
GETNUMRECS

  Get number of records. Number returned in RC

GOTO <num>

  Goto record. <num> is the number.

NEXTPRJ

  Goto the next Project window

PREVPRJ

  Goto the previous Project window

SELECTPRJ <filename>

  Jump to the project window that contains the given filename

@endnode

@node "rxreq" "3.2 Requester Commands   "

SELECTFILE <title>

  Brings up a file requester. <title> is the title for the requester. On
  return, RC will be 0 and RESULT will contain the path and filename of the
  file selected.

REQUEST <prompt> GADS <gadgets>
  
  Brings up a requester. <prompt> is what the text is, <gadgets> is the
  gadget format. i.e. 'Ok|Cancel'. Each gadget name is seperated by a |.
  If you put an underline (_) before a char, that one will be underlined and
  can be selected by pressing that button. RC will equal the number of the
  gadget selected. 0 for the rightmost one, and numbered from 1 - n for the
  leftmost to rightmost - 1.

GETSTRING <prompt>

  Brings up a string requester.
  On return, RC will equal 0 or 5 if the user canceled. RESULT will contain
  the string.

@endnode

@node "rxexamp" "3.3 Example Scripts      "

In the MegaBook:Rexx drawer, you'll find the ARexx examples. The examples
included in this release are:

LoadOld.mbrx                Example that loads MegaBook 2.x files
FrontSheet.mbrx             Creates info headers for your databases.
PrintLabel.mbrx             Prints address labels
Open.mbrx                   Opens a file
Merge.mbrx                  Merges a file
Port_Test.mbrx              A simple test script to make sure ARexx works
MegaLotto.mbrx              Lottery number generator
Example_Startup.mbrx        Example startup script
MegaCookie.mbrx             Fortune Cookie script
MegaCookie_Startup.mbrx     Same as above, but suitable for startup scripts
RegisterMegaBook.mbrx       MegaBook Registration script

@endnode

@node "rxtec" "3.4 Writing your own scripts"

All MegaBook scripts should start with the following. This will run MegaBook
if it isn't already running and wait for the ARexx port to become available.

--------- cut -------------------------------------------------------------
/*
** Comment (Required by ARexx)
*/

/*
   The path to MegaBook in case it isn't running
*/
MegaBookPath = 'MegaBook:MegaBook'

/* Check if MegaBook is running, if not, run it */
if ~show('P', 'MEGABOOK.01') then do
	address command
	'run >nil: ' MegaBookPath
	/* Wait for the ARexx port */
	do 5 while ~show('P', 'MEGABOOK.01')
		'sys:rexxc/waitforport MEGABOOK.01'
	end
end

address 'MEGABOOK.01'
options results
--------- cut -------------------------------------------------------------

You should use this in all apart from the startup script (as that should
only be run by MegaBook).

You're now free to do what you want in the script.

IMPORTANT NOTE: If MegaBook's windows are locked, or a window or requester
is open (excluding the find and print windows) then the ARexx port WONT
work. As soon as the requester is gone, however, all arexx commands waiting
will be processed. 

See the example scripts for more information on writing your own scripts and
some usefull code.

New to version 4 is the ability to "learn" scripts using the macro recorder
from the Extras menu. To use it, select Record ARexx... then whatever
you do in MegaBook till you select Stop Recording will be saved into an
ARexx script for you. After you've selected Record, you will be asked for
a file name to save the script into. The header mentioned above will be
saved into the recorded script for you. 

If you write a good script for MegaBook, we'd love to see it! Send it to us
and we may even put it in the next release of MegaBook!

@endnode

@node rxsp "3.5 Special Scripts"

MegaBook 4 has some special ARexx scripts, some of which are optional.
Please see section @{"4.1" link "xintro" 0} for more information on the extras.

The other special script is the Startup.mbrx script which resides in your
MegaBook:Rexx/ directory. This script is run when you start MegaBook.
This script is extremely usefull and can be fun too. For instance, you can
use it to open your favourite database or possibly to password your copy
of MegaBook. A fun (sort of) example of the Startup.mbrx can be found with
the fortune cookies script provided. 

@endnode

@node "xintro" "4.1 Introduction         "

MegaBook 4's Extras are unique to MegaBook. You won't find them in any other
Address Book program!

Put simply, the Extras take the grind away from doing regular things with
the database. They allow you to tone-dial your phone, call your friend's
BBS, send a fax and even send an EMail. The extras are completely
customizeable to suit your system. It's based partly around ARexx to allow
for a greater degree of flexibility. There's a Storage directory with
scripts for the most used Terminal's, Mailers and Fax software. Plus, if
there isn't a script there that you need, simply EMail us and tell us what
you want and we'll write it, and send you the script!

MegaBook 4's installer can automatically set this up for you. If your
sofware isn't in the list then you will have to create your own script.
See section @{"4.7" link "xscript" 0} for more information on this.

MegaBook 4 also allows you to use external loaders/savers called MBIOs.
These let you add support for just about any file format in existance, as
long as you have an MBIO for it. A number of usefull/less MBIOs have been
included with MegaBook.
@endnode

@node "xvoice" "4.2 Voice Dialing        "

Voice dialing is the ultimate extra for extremely lazy people. Simply hold
your phone's mouthpiece to the speaker and select Dial Voice. It might take
a little while to get the volume right but once you have, MegaBook will dial
all your friends for you. Now you have no excuse for forgetting your mums
phone number!

The dialer is quite inteligent and wont let you dial if there isn't a 
voice number in the current record.
@endnode

@node "xdata" "4.3 Data Dialing         "

Data dialing is a simple alternative to using your terminals phone book
facilities. Sort of anyway. Data dialing works a little like Voice dialing
except it uses a terminal program to dial. 

Note: The script DialData.mbrx MUST be present in the MegaBook:Extras/
directory. This script is installed by the installer from the storage dir.
There's scripts for NComm, Term, Termite and ZeeTerm. 

The script will run the terminal if it isn't running already. Note that in
order for this to work, you must change the variable in the script to the
path of the terminal. The comment in the script tells you what to do.
@endnode

@node "xfax" "4.4 Sending Faxes        "

Fax sending works the same as Data Dialing. Unfortunately, we couldn't get
hold of any ARexx port docs for any fax programs so you'll have to write
your own. When the script is run, the Fax number is parsed in the command
line for you. The script name is SendFax.mbrx
@endnode

@node "xmail" "4.5 Sending EMails       "

EMail sending is a little more complex then the dialing but not much. 
The script this time is SendEmail.mbrx. Scripts have been provided for Spot
and Yam. In the Spot script, you'll need to change the path to Spot and the
area name to post in. For the Yam script, you just have to change the
Editor. The comments in the scripts help you with this.

When the script is run, you'll get the editor up and in Spots case, the
usual message header window. In Yam's case the script does a little more as
it's ARexx port isn't as good as spot's so the Script creates a text file
in RAM: and asks you for a subject. it then puts the message in Yam's
outgoing queue.

New for Version 4.0 is an ARexx script that doesnt need a mail program to
send EMail. You will need to set the editor in the script the same way as
with Yam, but the rest is automatic.
@endnode

@node "xstore" "4.6 Extras Storage       "

The Extras Storage drawer contains the scripts for the Extras menu. When
you install MegaBook 4, the installer automatically sets this part up for
you so you only need worry about this if you get a new Terminal or Mail
software.

An Update program using commodores installer is included in the Storage
drawer, which will update your current Extras scripts from Storage.
@endnode

@node "xscript" "4.7 Writing scripts"

Writing your own Extras scripts is easy. MegaBook checks to see if a
record has valid data for the action you're trying to do and then runs
the script or pops up a requester. 

When run, your script will be parsed the number/address in the command line.
Note that you don't need to bother checking if MegaBook is running as you
should be run from MegaBook.

Have a look at the current scripts if you get stuck. The MegaBook ARexx
port is still available whilst a script is running if you need it.

If you write a good Extras script, we want it! Escpecially Fax scripts.
See section @{"5.2" link "contacts"} for where to send them.
@endnode

@node mbio "4.7 The MBIO System"

MegaBook 4.0 now supports external loaders and savers, known as MBIOs. They
reside in the MegaBook:Extras/MBIO/ directory, and you can have as many or
few as you like. Put simply, they allow drop in support for extra file
formats. Each MBIO can handle either loading, saving or both. When you load
a file, if MegaBook doesnt recognise the file format internally it will check
its MBIO list and ask each one if it can handle the file. The first MBIO to
say yes will be used. The MBIO's are checked in the order that they appear
in a directory listing, you can check this in the MBIO Information window
described below. Note: MegaBook's internally supported formats are checked
first, so you cannot use an MBIO to override MegaBook's file format.

In the Extras menu there is a new option called "MBIO Information", selecting
this brings up a list of the current MBIOs that MegaBook is using. From here
you can view information on the MBIOs using the About button. Some MBIOs will
also support preferences of their own. If the Prefs button is not ghosted,
it will allow you to enter the MBIOs preferences. 

If you wish to write your own MBIO, please email me at fosters@dvalley.demon.co.uk
and ask for the developers information. The developers information will be
released shortly after MegaBook. The reason it wasnt before was because I
didnt want people to write MBIOs using the V4 specification, as it would of
changed (and in fact did) when i added the Country field in 4.1

In the next version of MegaBook the only format supported internally will
be MegaBook 4's format. This will mean that if you cant use the MBIO system
for whatever reason, then you will only be able to save and load in MegaBook 4
format. 

@endnode

@node "credits" "5.1 Credits              "

MegaBoook 4 has been produced by Eden Developments and is
© 1996,1998 Eden Developments.

My thanks to the following people:

Steve Clack        : Yam mailer script, Beta Testing, Ideas
Edward Farrow      : Scripts
Jay Swackhamer     : Beta Testing and Ideas
Bob Wakulich       : Beta Testing
Andrew Jones       : Beta Testing
Per Reidar Bogstad : Beta Testing
nicholas@IRC       : SMTP ARexx script and Ideas

Thanks also to all other people who have sent ideas and support over the
last 2 years :)

@endnode

@node "contacts" "5.2 Contacts             "

You can contact me at fosters@dvalley.demon.co.uk, however for MegaBook
related questions I'd prefer it if you wrote to the address below.

For support or to submit an ARexx script for the next version, email
megabook@dvalley.demon.co.uk
@endnode

@node "eden" "5.3 Eden Developments"

Eden Developments is the successor to the old Eden Software group. Eden is
now an actual company, operating in the UK. We provide computer services
for businesses and home users, including repairs and upgrades, web pages,
internet setups, etc.

So, what exactly happened to Eden Software ? The Internet. It just got
impossible to keep up with what people were doing, fights happened, BBSs
closed, I left the Amiga scene, and Eden died. Eden was reborn in January
1998 when I started the company Eden Developments, and recently I found the
old MegaBook sources so I emailed people who had asked about it in the past
and decided to restart the project. Steve's helped a little with beta testing,
as for the rest of the old Eden ... who knows ? If you used to be in Eden
feel free to email me and tell me :)

@endnode

@node Index "MegaBook.guide Index"

                           @{b}MegaBook.guide Index@{ub}
                           
 @{" 1.1 Introduction         " link "intro" 0}
 @{" 1.2 System Requirements  " link "sysreq" 0}
 @{" 1.3 Legal Stuff          " link "legal" 0}
 @{" 1.4 Registration (Free!) " link "reg" 0}
 @{" 1.5 Distribution         " link "dist" 0}
 @{" 1.6 Installation         " link "inst" 0}
 @{" 1.7 Using This Guide     " link "guide" 0}
 @{" 1.8 Release Notes        " link "rnotes" 0}
 @{" 1.9 Upgrading            " link "upgrade" 0}
 
 @{" 2.1  The First Time      " link "first" 0}
 @{" 2.2  The Windows         " link "windows" 0}
 @{" 2.3  Records             " link "records" 0}
 @{" 2.4  Navigation          " link "nav" 0}
 @{" 2.5  Loading             " link "load" 0}
 @{" 2.6  Saving              " link "save" 0}
 @{" 2.7  Searching           " link "search" 0}
 @{" 2.8  Printing            " link "print" 0}
 @{" 2.9  Settings            " link "prefs" 0}
 @{" 2.10 Menus               " link "menus" 0}
 
 @{" 3.1 Database Commands    " link "rxdata" 0}
 @{" 3.2 Requester Commands   " link "rxreq" 0}
 @{" 3.3 Example Scripts      " link "rxexamp" 0}
 @{" 3.4 Writing scripts      " link "rxtec" 0}
 @{" 3.5 Special Scripts      " link "rxsp" 0}
 
 @{" 4.1 Introduction         " link "xintro" 0}
 @{" 4.2 Voice Dialing        " link "xvoice" 0}
 @{" 4.3 Data Dialing         " link "xdata" 0}
 @{" 4.4 Sending Faxes        " link "xfax" 0}
 @{" 4.5 Sending EMails       " link "xmail" 0}
 @{" 4.6 Extras Storage       " link "xstore" 0}
 @{" 4.7 Writing scripts      " link "xscript" 0}
 
 @{" 5.1 Credits              " link "credits" 0}
 @{" 5.2 Contacts / Support   " link "contacts" 0}
 @{" 5.3 Eden Developments    " link "eden" 0}
 
 @{" 6.1 Funny Bugs           " link funny 0}
@endnode

@node funny "6.1 Them funny bugs no-one likes to talk about :)"

This section has been written for a bit of a laff. Its just a list of funny
bugs that sprung up before MegaBook 4.0 was released but were fixed so no1
saw em :) 

 o This has to be the ALL TIME BEST bug :) Development was going really well
   and I was just updating the file format to handle the new features. Then,
   all of a sudden MegaBook crashed. Not that surprising, you may think, but
   i hadnt even run it yet! The compiler was spewing for some reason I couldnt
   find at all. It took me 2 days to find what was wrong and crashing Dice,
   eventually I discovered a call was being prototyped after it was defined
   and Dice didnt like it at all ... nasty!
 
 o Another nasty one ... suddenly notes stopped working and started dumping
   the entire memory to T:. To this day I still dont know why it does it,
   but it only seems to do it when i activate the current project after an
   open. This has been extensively tested and retested and I still cant find
   the reason why, but never mind, it works as it is for now, so Ill leave
   it and come back to it when I have less to do. Excpect fixes in 3008 :)

 o Another quite funny one. The first generation macro recorder (i.e. my
   first attempt) worked extremely well. Except for when a ARexx command
   needed arguments. I forgot to write the name of the command, so some 
   commands ended up as memory dumps. One such example is the recorder
   saving parts of the assembly source (the source generated by the C
   compiler, that is) into the arexx script. 
 
These are from MegaBook 3.2
 
 o Due to me being tired when i recoded the toolbar, i forgot to remove the
   font adaptivity. This led to some funny side effects when the system font
   wasn't topaz :) We had mis-sized gadgets with the images staying the same
   size and overlapping everything :)
   
 o In another bout of stupidness i COMPLETELY forgot to call the iconify
   handling code so when u iconified, nothing was checking for the close
   gadget :) It took me a few hours to find what was wrong :((

@endnode
