COUNTER 4.1
============
(C) 1997 Shane Brooks
A copy of this text in Microsoft Word 6.0 format is also supplied
as Counter.doc.

New Location for Counter 4.1 WEB Page:

http://www.sci.monash.edu.au/deeb/counter

Documentation and free upgrades available from web site


DISCLAIMER
==========
Counter 4.1 is copyright Shane Brooks, 1997, and  is 
not supported by Monash University.

Although every endeavour has been made to ensure that COUNTER is 
bug free and stable, no warranty is given for any computer 
malfunction or data loss incurred whilst using COUNTER. Users of 
COUNTER do so at their own risk.

IF THESE TERMS ARE UNACCEPTABLE you must uninstall Counter 4.1
immediately.

LICENSE CONDITIONS
==================
The evaluation copy of COUNTER will not export data to an ASCII 
file.  This is the only feature that differs from the licensed copy.

You are entitled to copy and redistribute the evaluation copy 
freely, so long as this text file is distributed with the COUNTER.EXE 
executable and both the text file and executable remain unchanged.

The fully functional program costs $60 Australian for a single
workstation license (multiple users).  Unlimited 
Site-Licenses may be purchased for Aust$150 for educational/government
departments, or Aust$300 for commercial enterprises. A site is defined
Physically as well as administratively.  A single department in two
cities will require two site licences. Bulk discounts are available -
contact the Author for details.

To Purchase:
------------
    Purchases are currently handled by Monash University
although this may change in 1998 (contact Author for current details).
Purchase orders are accepted (Monash will invoice you) - or send a
cheque or money order for AUSTRALIAN $$$'s made out to "Monash University"
to:
	Counter Software
	Dept Ecology & Evolutionary Biology
	Monash University
	Wellington Rd,
	Clayton 3168
	AUSTRALIA

All proceeds go towards my current research programs in freshwater
ecology as part reimbursement for my time spend programming
COUNTER.  COUNTER was developed by me personally to assist
my research, and is NOT a product of Monash University.

All registered users get LIFETIME FREE technical support and will be
sent FREE software updates when/if they become available.

Until the end of 1997 - contact me at:

	Shane Brooks
	Dept. Ecology and Evolutionary Biology
	Monash University
	Clayton 3168
	AUSTRALIA

	Email shane.brooks@sci.monash.edu.au
	Phone +61-3-990-55623
	FAX  +61-3-990-55613

If I leave in 1998 - I will leave a forwarding address.


INSTALLATION
============
Run "Install.bat" on the floppy disk containing the self extracting
archive COUNT40.EXE.  This will put the executable file COUNTER.EXE and
a copy of this ASCII file COUNTER.TXT in the directory you specify.
A sample database SAMPLE.COU is provided for you to familiarise 
yourself with COUNTER.

The file "Blank.com" is provided with the registered version.
Add a line to execute blank.com in your autoexec.bat file and the screen
will go blank after 30 seconds without a key press.  This is a screen saver
 - hitting any key brings it back (<space> or <alt> are best because these
are not used as counter keys). 


INTRODUCTION
============
COUNTER is a DOS software program that uses an IBM compatible 
computer as a multi-element digital lab counter.  Keyboard keys are 
assigned to up to 600 user configurable objects (5 screens, each
containing 120 counter items).  COUNTER keeps a database of counts
for these objects (maximum count 32000) for up to 1000 samples that can 
be exported as an ASCII file and imported into most spreadsheet 
programs and statistical software.  Count data, objects and key 
assignments can be edited at any time, and multiple databases can be 
maintained on the computer.  The user can switch between samples or 
databases at any time.

COUNTER uses a 4 tier data backup strategy to maintain the data.
Data integrity is maintained even in the event of power failure.
All database backing up is automatic.

The program was originally written to count the abundances of 
different invertebrate species in stream benthic samples, but it 
could just as easily count seeds in soil samples, cells types in 
tissue cultures.... you get the picture.

COUNTER runs in DOS to make use of the many IBM XT and 286 computers 
that are gathering dust in laboratories and are now worth far less 
than mechanical laboratory counters (our last 5 element mechanical
counter was $500.00, an IBM 286 is now about $50!).


FILES
=====
In program path:
    README.TXT      - Late breaking news READ THIS FIRST!!!!
    COUNTER.EXE     - Counter 4.1
    COUNTER.TXT     - This text file
    COUNTER.INI     - Saved defaults
    COUNTHLP.EXE    - OnLine HELP executable
    COUNTER.HLP     - HELP file
    Blank.COM       - screen blanking screensaver
In Data path:
    xxxxxxxx.COU    - Database file of item names (species names) 			
    xxxxxxxx.COD    - Database file of counts for each item 
    xxxxxxxx.LOG    - automatic log of all changes made to database for 
		   emergency database restoration.
In Backup Path:
    xxxxxxxx.BKN    - Auto-Backup copy of xxxxxxxx.COU
    xxxxxxxx.BKD    - Auto-Backup copy of xxxxxxxx.COD
    xxxxxxxx.~~N    - Backup of Auto-Backup copy of xxxxxxxx.COU
    xxxxxxxx.~~D    - Backup of Auto-Backup copy of xxxxxxxx.COD



RUNING COUNTER
==============
The first time you run COUNTER.EXE you will be prompted for the 
default path for you database and backup files.

You will then be prompted to open a database.  You can search for an 
existing database (SAMPLE.COU), or simply type in a new name in the
filename box to create a new database.  The extension .COU will be
added automatically.

For a new database you will be prompted for a SAMPLE LABEL and then 
for the name of the first counter item.  This item will be given "1" 
as its counter key definition.  All subsequent addition to the 
counter will need count key definitions added manually <ctrl-K>.
You can edit the counter key definitions, item names, sample names at 
ANY TIME.

Every key press is written directly to the hard disk.  If the power 
goes off, you can just restart COUNTER and the program will pick up 
where it left off.


LIMITATIONS
===========
COUNTER can count up to 32760, but only display 4 digits per item
on the screen.  Counts over 9999 will be displayed as the last three
digits only after a "+" (e.g. 12987 will be "+987").
The full count is exported.

COUNTER supports up to 1000 samples (A convenient size to limit 
database files so they fit on a 360K 5.5" floppy disk for backing up)

COUNTER can count up to 600 items in 5 screens of 120 each.

You can assign 94 Counter key definitions to the 120 objects on each
screen (limited by number of keys on the standard IBM keyboard).  You can
reuse keys on different screens.  By all means have 
120 objects in the database and enter data manually for the 30 (rare 
items) that are left out (see below - EDIT DATA).


A FEW RULES OF THUMB
====================
NEVER separate the xxxxxxxx.COD and xxxxxxxx.COU files.  They are 
BOTH needed for each database.

You can have as many different databases as you want.  For example, 
one for each different experiment you conduct.

NEVER use SPACES in ITEM names or SAMPLE names.  Most statistical 
packages do not allow this anyhow.  Use a "_" instead.  COUNTER will
automatically convert spaces to "_".

You can delete the old LOG files (xxx.000 ,xxx.001, xxx.002 etc) if you
need the disk space.  I would hang onto them just in case.  LOG files
have a maximum size of 300k before a new LOG is started (to ensure LOG
will fit on a single 300k floppy disk).

Backup manually <ctrl-B> whenever you change sorting trays, go on a 
break, get disrupted for a chat or whatever - just to be sure.

Each time you add a screen the database file grows proportionately.
Use as few screens as possible to save disk space/backing up time.
The last EMPTY screen can be removed from the EDIT menu.

THE SAMPLE DATABASE "SAMPLE.COU"
================================
Use the file menu OPEN/NEW command to open the SAMPLE.COU database.
This displays a few features and will allow you to become familliar
with COUNTER.

Notice that not all ITEMS need a counter key.  Rare occurences of
an item can easily be added manually at any time using EDIT menu,
EDIT DATA or <ctrl-D>.

You can use blank ITEM NAMES and "----------" as "Spacers" to make the
screen look tidy.  Any ITEM NAME entered starting with a "-" will
be convereted to "----------".
Any Item name starting with a "*" is considered a "Header".

Spacers and Headers are not exported to the ASCII file unless you have the
EXPORT KEY DEFINITIONS box checked.

You should try to EDIT the NAMES, KEYS and count DATA. (See below for
instructions.  ONCE YOU ARE IN EDIT MODE, YOU HAVE TO REPEAT THE
EDIT MENU COMMAND TO RESUME COUNTING.

the SAMPLE database contains 9 separate samples.  You can switch between
them using the EDIT, CHANGE SAMPLE command or <ctrl-C>.

From the EDIT menu select ADD SCREEN to add space for another 120 items.
Press F1 to change back to screen 1.  Enter EDIT NAMES <ctrl-N> and move
the edit box over an item name. Press <space> to select that item.
Press F2 to move to screen 2 and press <Space> again to drop the item onto
the empty screen.  You acn also move Counter items around on the one screen
using the same technique.

After you have done some editing, you can look at the SAMPLE.LOG file
to see what info is written here.  This is a fourth level- last resort
to allow you to manually re-create your database if needed.

ADDING NEW ITEMS
================
Use the EDIT NAMES command or <ctrl-n> to enter "Edit Names Mode".
Simply type the new name in a blank spot on the screen.

ADDING NEW SCREENS
==================
On the EDIT menu you can ADD SCREENS.  This will add another 120 empty
places on a new screen (up to 5 screens).  Switch between screens
using F1-F5 to choose the screen you want.

REARRANGING ITEM NAMES ON THE SCREEN
====================================
Use the EDIT NAMES command or <ctrl-n> to enter "Edit Names Mode".
Pressing the <space> bar while on a name will select it.  Move to the new
location on the screen and press space again.  The item will be moved
to the location immediately UNDER whatever name you dropped the item on to.

When moving between screens, press <space> to select the item.  Press F1-F5
to move to the new screen and locate the item in an EMPTY spot. Press <space>
again to drop the item in its new position.  YOU CAN NOT DROP AN ITEM ONTO
AN EXISTING ITEM IF YOU ARE MOVING BETWEEN DIFFERENT SCREENS.


IMPORTING ASCII DATA
====================

Data files must be in either of the following formats.
	Comma Separated Value (.CSV)
	Space Delimited (.TXT)
	Tab Delimited (.TXT)
Although the import file box defaults to *.CSV you can enter any filename.
Files must be recatangular matrices with SAMPLES AS ROWS and
COUNTER ITEMS IN COLUMNS.
The first row must contain the counter item names.
Sample lables should have the header "Sample$".
If counter key assignments are to be imported also, they must be
  on the second row with the label "CountKey>".
If screen positions are to be imported also, they must be
  on the third row under the Key definitions with the label "ScreenPos>".
Screen Positions must be between 1 and 600 (1-120 = screen 1,
121-240 = screen 2....etc) and MUST BE IN ASCENDING ORDER!

The CountKey> and ScreenPos> rows are OPTIONAL import data into Counter.
e.g.

Sample$     Species1  Species2  Species3  Species4
CountKey>   q         w         e         r
ScreenPos>  2         14        15        16
Sample1     23        123       1234      654
Sample2     78        88        7         45
   "         "         "         "         "
   "         "         "         "         "
Samplex     xxxx      xxxx      xxxx      xxxx
   		

EXPORTING ASCII DATA
====================
Spacers are item names entered as: "---------"
Headers are item names entered as" "*xxxxxxxx"

Spacers and Headers are not exported to the ASCII file unless you have the
EXPORT KEY DEFINITIONS box checked.

Exported ascii files are in standard Comma Separated Value (.CSV)
format and can be read into most spreadsheet and statistical packages.



DATA SECURITY
=============
Each key press is written to the harddrive so that even if the power
fails you can restart Counter and it will resume where you left off
without data loss.

The Entire Database is backed to a removeable floppy disk whenever you
Exit the program, change samples, add a sample, or change databases.

An emergency copy of the database files are saved every time you edit
item names or data and are automatically reinstated if an error occurs
while you are performing the edit session.

Existing "Primary Backup" files (*.BKN, .BKD) are renamed (.~~N, *.~~D )
and new backups are saved.  Your "Secondary Backup" files *.~~N and *.~~D
are your "backup of your backup" files.  I did this because if you exited
Counter on discovering a problem, "AutoBackup" would save the problem
file over your good backup files. (In this event the Data is still
recoverable from the *.LOG file).

To this end I added "KILL" to the File Menu.  Kill will exit
Counter WITHOUT SAVING A BACKUP.  IF YOU SUSPECT A PROBLEM WITH YOUR
DATABASE USE KILL TO GET OUT.  Make copies of all relevant files
(*.COD, *.COU, *.BKN, *.BKD, *.LOG, *.~~N, *.~~D) and ONLY THEN start
trying to restore your Database.  Then if you make any mistake you
have copies of all the important data files to fall back on.
	REMEMBER: *.BKN and *.~~N can be renamed to *.COU
		  *.BKD and *.~~D can be renamed to *.COD

I have added PRINT functions to this version so a hard copy can be kept.
(you could always export an ascii file and print that.)

RECOVERING A CORRUPTED DATABASE
===============================
This section contains details of how best to recover if the unthinkable
happens and your database becomes corrupted somehow.

1) IF YOU SUSPECT A PROBLEM WITH YOUR DATABASE USE "KILL" TO GET OUT.

2) Make copies of ALL relevant files
   (*.COD, *.COU, *.BKN, *.BKD, *.LOG, *.~~N, *.~~D) and ONLY THEN start trying
   to restore your Database.  Then if you make any mistake you have copies of
   all the important data files to fall back on.

3) Use "Reload from Backup" on the FILE menu to copy your last backup over the
   top of your database files and restart the counter.  If restoring the Primary
   Backup (*.BKN) doesn't solve your problem, then use "Reload from Backup" on
   the FILE menu again and this time restore the Secondary Backup (*.~~N).

If this fails all the data is in your *.LOG file - or send me
all the relevant files and I will have a go for you (NO GUARENTEE!)
   
CONTACTING THE AUTHOR
=====================
Location for Counter 4.1 WEB Page:

http://www.sci.monash.edu.au/deeb/counter

Documentation and free upgrades available from web site

see the FILE menu - ABOUT

Until the end of 1997, I can be contacted by e-mail at  
Shane.Brooks@sci.monash.edu.au  - after that see web page.

Please contact me if you have any comments, bug reports, criticisms, 
or notice any glaring omissions from the text file.
I can do customisations on request (for free if minor).   Any 
feedback is welcome.

-------------------------------------------------------------------
THE FILE MENU
=============
The <alt> key activates the menus - just like windows!

File
-----------------
Open/New        -Select a new database to count data for.  If you 
		  are starting a NEW database just enter a new name 
		  in the FILENAME box.
                  I added "Convert Backup" button to the open database
                  dialog box. This enabled users to convert a backup
                  file to a database, regardless of whether the
                  database is present on the system to start with.
                  - Usefull for transfering databases between computers
                  using the Backup files that are on the floppy disk.
Save Backup     -Updates the BACKUP copies of your database.  Use 
		  this between sorting trays, when taking a break 
		  or whenever.  The if you make a load of mistakes 
		  or loose you place in your sorting tray you can 
		  use the "Reload from Backup" menu item to restore 
		  your database back to where it was the last time 
		  you backed up.  This backup is also done 
		  automatically if you have the Option 
		  "Autobackup" set, whenever you add a sample, 
		  change to a different sample, open a new 
		  database, or exit the program.
Reload from Backup      -Copies your backup files over the top of your 
			  database files BE CAREFULL HERE.

-----------------
Export          -Exports the entire ITEM x SAMPLE matrix, with or 
		  without counter key definitions, to an ASCII 
		  comma separated value file.  This file can be 
		  read into all(?)  spreadsheet packages and most 
                  statistical packages.
Import          -Imports a comma or tab separated value file, with 
		  or without counter key definitions.  IT IS 
		  IMPORTANT THAT YOU DO NOT HAVE SPACES IN YOUR 
		  ITEM NAMES OR SAMPLE LABLEL.  I would stick to 
		  Comma separated value files if you have any 
		  trouble.
-----------------
Print
   Current Sample   -as it says
   Entire Database  -as it says
-----------------
HELP            -On line help (shortcut <ctrl-H>) is available
                  while counting, editing names, editing keys, or
                  editing data
About           -My blurb
-----------------
Kill (NO Backup)-Kill will exit Counter WITHOUT SAVING A BACKUP.
                  If you suspect a problem with your database use
                  KILL to get out so that "AutoBackup" does not write
                  over your Backup files with a corrupt database.
                  There is still a 2nd Backup and the *.LOG file if
                  the primary Backup is corrupted.
		  In the event of a problem get out of Counter using
                  KILL.  Then make copies of all relevant files
                  (*.COD, *.COU, *.BKN, *.BKD, *.LOG, *.~~N, *.~~D) and
                  ONLY THEN start trying to restore your Database.
Exit            -Exit the program.

-------------------------------------------------------------------
THE EDIT MENU
=============
The <alt> key activates the menus - just like windows!

EDIT
-----------------
Add Sample      -Adds a new sample to the database, resetting all 
		  screen values to zero.
Delete Sample   -Removes a sample from the database.
Change Sample   -Switch between the stored samples.
Edit Sample Label       -as it says
-----------------
Edit Data       -Activates the EDIT DATA box. Just position the 
		  box with the arrow keys and enter the new data 
                  values. YOU MUST HIT THIS MENU OPTION AGAIN OR
		  USE THE SHORTCUT <CTRL-D> TO RESUME COUNTING.
                - <ctrl-H> while editing will open the help file.
Edit Names      -Activates the EDIT NAMES box. Just position the 
		  box with the arrow keys and enter the new name.
                  Press <Space> to pick up an item.  Move to a new
                  location and press <Space> again to drop the item.
                  You must drop into an empty location if you are
                  moving across screens, otherwise the item will be
                  located BELOW the one you dropped it on. 
		  YOU MUST HIT THIS MENU OPTION AGAIN OR USE THE 
		  SHORTCUT <CTRL-N> TO RESUME COUNTING.
                - <ctrl-H> while editing will open the help file.
-----------------
Counter Keys    -Activates the EDIT KEYS box.  Just position the 
		  box with the arrow keys and hit the new counter 
		  key.  <shift>-X is allowed.  YOU MUST HIT THIS 
		  MENU OPTION AGAIN OR USE THE SHORTCUT <CTRL-K> TO 
		  RESUME COUNTING.  Use the <space> bar to clear 
		  individual key definitions.  Counter will check 
		  for duplicate definitions.
                - <ctrl-H> while editing will open the help file.
Wipe Counter Keys       -Clears ALL key definitions.
-----------------
Add Screen      - Adds another screen to fit another 120 counter items.
                  Count keys can be reused on each screen. Data in
                  only added to the screen you can see at any one time.
                  You can have up to 5 screens totalling 600 counter items.

Remove Screen   - Removes the last empty screen from the counter and
                  reclaims the data space.
                  You cannot remove screen 1.  The screen must be empty
                  before it can be removed, and must be the last screen.
Edit Screen Titles    as it says
-------------------------------------------------------------------

THE OPTIONS MENU
================
The <alt> key activates the menus - just like windows!

Options
-----------------
Prompt Change Screens  -turns on/off a confirmation dialog when
                        you use F1-F5 to switch to a new screen.
                        Safest if left on so you dont start counting
                        an item that is on another screen by mistake.
Backup on Change Sample	-turns on/off the auto-backup whenever you change to
                        another existing sample using the Edit Menu,
                        CHANGE SAMPLE or <Ctrl-C>.
                       -Speeds up the use of Counter when you need to switch
                        between a lot of samples.  This added utility comes
                        at the expense of data security - your most recent
                        backup may not contain up-to date data for all samples.
                        All of the changes that you made would however be
                        recorded in the LOG file so the added risk is minimal.
Print Log       -If you have a printer permanently hooked up to the
                  computer, each entry in you LOG file will be
                  duplicated on the printer.  (For the ULTRA paranoid).
-----------------
File Paths      -Define your default database and backup file 
		  locations
Control Panel   -Sets screen colours.
Printer Setup   -Set printer port and printer init string.
                 To Save paper try printing 135 characters per line and using
                 "ESC 15" as your init string (print in compressed mode).

-------------------------------------------------------------------
