              **************************************
                         M E M O     1.5

                (c) Copyright Matthias Lenski 2001
                
              **************************************

** Hinweis: Lesen Sie Liesmich.txt als Deutsche Version dieser Anleitung **              

Welcome to Memo, also called the "birthday program" ;-) 
This README is a user manual based on examples. Its contents are: 

1. WHAT FOR: This program reminds you of birthdays
2. QUICKSTART: How it works
   a) Putting MEMO.EXE into your Startup-Folder
	b) Adjusting country and date notation 
   c) Recording birthdays
3. ADJUSTMENT: How to adjust the program
   a) Recording Dates other than birthdays
   b) More Parameters
   c) Fine Tuning
4. EPILOGUE (including CHANGES)

Requirements: You must have Windows 95 or better. The program is freeware.


1.) WHAT FOR
=======================================
Everyone can recall some birthdays, but we miss some every year. 
What could be more obvious than giving the PC the job of reminding a couple
of days in advance? Now, there were some freeware or shareware programs 
who did exactly this. The smallest was some hundred kilobytes in size but
didn't work with a high resolution monitor. Other programs were resident
and occupied memory after termination. Therefore I wrote my own program
one weekend. This is only 20 kilobytes in size, it is fast, non-resident
and wery widely adjustable. Adjustment abilities allow its use for other
purposes than birthdays (see below).


2.) QUICKSTART: How it works
=======================================
The proram consists of two files, which must be held in the same folder on
your harddisk. The files are MEMO.EXE and MEMO.TXT. The first one, MEMO.EXE
is the program itself. Running the program requires but three steps:


a) Putting the program MEMO.EXE into your Startup-Folder

Enabling the program to remind you of dates requires a link to the program
inside of the Windows Startup-Folder (in the Start-Menu). You should find
a explanation of how to achieve that in Windows 95/98 user manual. 

In any case, here is a short description: 

First, open your Startup-Folder. To to this, RIGHT-click onto the Start-Button
and continue with "Open". In the appearing window you double-click onto 
"Programs" and in the next window onto "Startup". 

Search for MEMO.EXE now by left-clicking onto the Start-Button and continue 
with "Search -> Files/Directories". Type in MEMO.EXE as the file to search for
and click on "Start". 

Finally, click onto the appearing file MEMO.EXE, HOLD DOWN the mouse key and
"drag" Memo into the previously opened window "Startup". 


b) Adjusting country and date notation

The second file, MEMO.TXT contains all the birthdays and all adjustments.
It is a normal (ASCII) text file. 

First of all, open this text file. To do that, you can search for it the
same way you did for MEMO.EXE. Just click onto the Start-Button once more,
continue with Search ->Files/Directories, type in "Memo.txt" and click onto 
"Start". Afterwards you can open the appearing text file by a double-click. 

This is the place where you can do all adjustments to the program and record
all of your dates and birthdays. Every line beginning with "#" is a command 
adjusting the program, everything else is a date. 

The file already contains such adjustments, of which only #Default is of 
importance now. You should delete everything else, since the program does not
necessarily require any adjustments. Without them, it uses default values. 

#Default determines the language and date notation, since some countries write
the month first and the day second, while others start with the day. Use
#Default=1 for US-language and date notation (English, month first) or 
#Default=0 for international language and notation (English, but day first).
You may also choose 2=Germany, 3=France or 4=Spain. Five (Brazil) is beta.


c) Recording birthdays

Finally you must tell the program the dates or birthdays of which you want to 
be reminded. Every line, that does not begin with a "#", is regarded as a date.

Birthdays simply consist of the referred person, followed by the date of birth,
both seperated by a comma, for example:

Alfred Mustermann, 02-01-1988

Such a line in the file MEMO.TXT makes Memo remind you of Alfred's birthday, as
soon as it's the 1st of February. You may use other separators than '-', for 
example '.': 02.01.1988.

The year can be a two-digit number, in this case 1900 (!) will be added.
That's because still most birthdays are located in the 20th century, example:

Alfred Mustermann, 1-2-88

That will work just as well. Please notice that you can leave out leading 
zeros (1 instead of 01).

So just put all the birthdays of your friends and relatives into MEMO.TXT 
to be reminded. A simple double-click onto MEMO.TXT should activate your
editor, to get started (to find MEMO.TXT you might want to use the 
search-function of Windows 95 again). 



*****************************************************************************
** So, that's it. Now you know how to make use of this program. 
** The file MEMO.TXT doesn't need to contain anything except the birthdays.
** The only thing I strongly recommend is the headline (#Default=...)
*****************************************************************************



3. ADJUSTMENT: How to adjust the program
=======================================

a) Dates other than birthdays


Memo can also remind you of other dates than birthdays. The dates itself are
recorded just the same way as a birthday, you only change your text. Here is
an example for a birthday and a date:

Albert, 09-01-1986
Go to the dentist, 09-01-2001

When you add these to your Memo.txt file, you will receive a birthday message
("Tomorrow Go to the dentist will be 0 years old!"). Avoiding this effect was
difficult with older versions of Memo. Since version 1.3 Memo is flexible.

Just type: 

Albert, 09-01-1986
#EnvFlex=0
Go to the dentist, 09-01-2001

The parameter #EnvFlex works just like a switch. After #EnvFlex switched from
birthdays to other dates, more dates may follow. Also, you can switch back to 
birthdays any time you want, for example: 

#EnvFlex=0
Go to the dentist, 09-01-2001
Go to the barber's shop, ..2001
#EnvFlex=1
Bert, 10-08-2000

While I must meet the dentist on a fixed day, the other task has to be 
announced over again until it's done! Therefore we don't schedule it  
on a certain date, but only in a certain year (..2001).

When writing a date you may leave out any part of it (if it's not a 
birthday the year will be ignored anyway). For example, if you want to
be reminded on every 7th of a month:

Pay the rent, -07-

Since Version 1.5 it is also possible to display messages only if it's 
a certain day of the week, like Friday or Sunday using #EnvOnDow. Use

#EnvOnDow=5
Today is Friday, --2000
#EnvOnDow=0

to be reminded on every Friday but avoid the restriction for following dates.
To be reminded on the second Friday of the month you can use #EnvOnNr:

#EnvOnNr=2
#EnvOnDow=5
Today is the second Friday of the month, --2000

If you need the LAST Friday just set #EnvOnDow=5 or greater than 5.


b) More parameters

Internally, the program keeps all the adjustments in mind at a certain memory
cell. I call these memory cells the "environment" of the program. Therefore all
the commands to change them start with "#Env". The only exception is #Default,
which does nothing else than setting a number of Environment-values.

The date notation, nomally accessed by #Default can also be set separately:

#EnvFirst=0

makes the program assume that the dates have the format day/month instead of
month/day. Diffent from #Default, this command leaves the language alone. 
#EnvFirst=1 switches to month/day.

All environment variables can be written in uppercase or lowercase letters,
for example: #envfirst or #ENVFIRST or #EnVfIrSt, it's just the same.

First of all some basic values:

#EnvToday=02-01-2001

forces the program to assume, that today is the 1st of February (or, with 
EnvFirst=0 the second of January). By using EnvToday you can override 
your system's date which will otherwise be used. That's very useful to test 
the program. But keep in mind that you  can't override the current YEAR. 
Just try one of your birthdays in MEMO.TXT as "EnvToday" to give it a try.

(Note that if your date differs from the "true" date more than 6 months, the 
"day of the week" might not be calculated correctly. The reason is that such 
a date is regarded to go into the past instead of the future.)

#EnvLink=c:\doc\mydata.txt

determines your own text file that contains more birthdays. At the end of 
MEMO.TXT (not earlier) the program changes to MYDATA.TXT- without return!
So Memo.txt may contain only one link.

In this way you can store your birthday file in another folder than the
MEMO-folder. To achieve this, put a suitable (=birthday) text file into 
the folder of your choice and put only one line into MEMO.TXT pointing 
to your text file (#EnvLink=...).

#EnvAdv=3
tells the program, how many days in advance you'd like to be reminded. 
The default value is 4 days. The program will use this, if you don't
choose a different setting. (#EnvAdv=4 is therefore superflous)

#EnvLate=3
is a new parameter since version 1.3 to announce dates you missed. The value
determines how many days after an event you are still reminded (0=not at all).
The default is 2 days (to get one weekend's events) ;-).

#EnvIcon=64
adjusts which icon shall appear in the message box. There are 4 possible
icons: 16=red circle, 32=question mark, 48=sign (default), 64=info-bubble. 
Additionally you may add either 65536 or 262144 to make the message box
be the topmost or always the topmost window.

#EnvMax=10
sets the maximum of message boxes the program may open. The default is 10.
After the tenth message box the program stops, no matter how many more people 
have their birthday today. This setting avoids excesses which will accur if 
you set #EnvAdv=365... (did you try this?)

#EnvOnDow=07
is a filter ("Env-Only"), that is normally turned off (=0). It determines a 
day of the week (Dow=Day of week) on which a special event must occur to be
displayed. After using #EnvOnDow you must switch it off again by #EnvOnDow=0.
Here's an example, to be reminded of a Squash-match every Sunday:

#EnvOnDow=07; (means the following line is displayed only on Sundays (day 7)
Sunday is Squash Time!!, ..2001
#EnvOnDow=00


c) Fine Tuning

aa) Example: adding a person's address

Let's now discuss the last group of parameters , which affect the
message in the box itself. They are a bit more complicated, giving you
the freedom to produce even unusual reminder messages.

So far there were only 2 sentences the program could say. "Don't forget:..."
and "Tomorrow X will be Y years old". Strictly speaking there were three.
There had been a sentence for the past: "Yesterday X became Y years old!". 

These three texts are determined, of course, by 3 environment-parameters. 
Here are the parameters and their values, as long as they remain unchanged:

#EnvMsg=Don't forget:, (,)!
#EnvFut=,, will be, years old!
#EnvPast=,, became, years old!

If you want to change the message text from "Don't forget" to "For heaven's 
sake, don't forget:", just type:
#EnvMsg=For heaven's sake, don't forget:, (,)!

From now on, the message text for all following dates will be altered. 
The strange commas indicate, that at the places of the commas something else
is to be inserted. After the colon ("Don't forget:"), for example, the name 
of the date will be inserted ("Go to the dentist").

The program obeys the following rule: Every time a comma occurs in the message
text ("Dont forget:,") it switches to the date text, until a comma occurs
in the date text ("Go to the dentist,"). The comma in the date text makes it
switch back to the message text and so on.

Here's an example how to use that:
Assume, that we want to include the person's telephone number in the reminding
message. First of all we will append it to the date:

Go to the dentist, 09-01-2001, Tel.: 0177-367689
Go to the barbershop, ..2001, Tel.: 0174-532363

To avoid that the nuber is ignored, we append TWO commas to the message text
(one for the date, one for the telephone number):
#EnvMsg=Don't forget:, (,)!,,

After that, the message will contain the telephone number, if there is any. 
All of this is just the same for the other two message texts #EnvFut/#EnvPast.

You may alter #EnvMsg but leave #EnvFut/#EnvPast alone. In this case you can
easily switch between the program's birthday message and your own message using
the #EnvFlex parameter (see above).

Please keep in mind, that all of these settings come into force only
after they occur in MEMO.TXT. That means that you can first have
birthdays being announced in German, followed by "Default=1" and 
further birthdays in American notation.


bb) Other parameters

Maybe you guessed what the second comma in the #EnvMsg-Text (between the
brackets) is for. At its place the number of days to go (yesterday,
today, tomorrow) is inserted. But how does the program determine that it 
has to insert something else than the date-text and in the above example
must not yet switch to the date or telephone number?

Because another type of parameters tells the program that it must insert
the time interval exactly there.

#EnvWPos=4
(the default value) says, that the 4th piece of the written message shall be
the time interval. Piece 1: "Don't forget:", now follows a comma, therefore
piece 2 is: "Go to the dentist", after that comes a comma, so we switch to
the next piece in the message text (containing the bracket)-piece 3: "(",
and the following fourth piece shall be time interval (today, tomorrow...).

Each of the other texts (#EnvFut and #EnvPast) have a corresponding parameter:
#EnvWFut		determines the place of the "when"-text in the Future-Message
#EnvWPast	determines the place of the "when"-text in the Past-Message.

There's one more parameter which inserts the "age" of a person:
#EnvAPos=0
(the default value) says for the standard message, that there is no age to be
displayed. But the age is included in birthday messages for the future 
and for the past. In both messages, the age is inserted as piece 6:

#EnvAFut=6
#EnvAPast=6


c) New languages

Because every single text can be freely varied, the program can be
adjusted to any language just by changing #EnvMsg, #EnvFut and #EnvPast.
As a different message has its own words for "yesterday, today, tomorrow".
there is a special parameter #EnvWhen with the following default:

#EnvWhen=3 days ago, the day before yesterday, yesterday, today, tomorrow, the day after tomorrow, in 3 days

Since version 1.3 this parameter doesn't start with the present day any more,
but goes back to "3 days ago". Now it must have these seven entrys reaching
from "3 days ago" to "in 3 days". It is also necessary to use the digit "3"
instead of the word "three", so the computer can calculate his own intervals.

As you have read so far, all parameters have been covered. ;-)

Language adaptations can be used by all Memo users if you send a me an e-mail.
You don't need to send your own #Env-values, I'll do the adaptation for you. 
Just send an e-mail with a translation of the following 4 phrases:

"3 days ago, the day before yesterday, yesterday, today, tomorrow, the day after tomorrow, in 3 days"
"In 3 days Alfred Mustermann will be 12 years old!"
"3 days ago Alfred Mustermann became 12 years old!"
"Don't forget: Go to the dentist (today)!"


4. EPILOGUE
=======================================

It's nice to get feedback via e-mail. Send me a note with critizism, 
suggestions or comments, especially concerning the language adaptation.

My e-mail-address is: soft@addcom.de

The program was written using the freeware C-compiler LCC. 
Thanks to the compiler's authors, C.Fraser, D.Hanson, Jacob Navia!

CHANGES:
Memo 1.0: First release
Memo 1.1: Included French and Spanish;no more crash when #default too high
          Tried Portuguese; Invented new data format: 01.. / .02. /..00
Memo 1.2: (not published) Correction of the Spanish message text.
          Texts like "in two days" were replaced with calculation "in 2 days".
Memo 1.3: Reminding of missed dates possible ("2 days ago was X's birthday!").
          New parameter #EnvLate determines the number of days in the past.
          #EnvWhen must now have key words for the past ("yesterday"...).
          The default value of #EnvMsg was changed to a short Standard-Message
          Especially for birthdays there are #EnvFut, #EnvPast, #EnvFlex
          All messages begin with a capital letter, even if #EnvMsg doesn't. 
Memo 1.4: Memo can now distinguish the day of the week ("today is Friday"). 
          Filter #EnvOnDow to display message only on a certain day of the week
          Filter #EnvOnNr to restrict message to occurance (FIRST Friday)
Memo 1.5: Extensions to the "day of the week" functions. The display can be
          not only be restricted to a certain day of the week, but appears 
          also a certain amount of days in advance; the same for #EnvOnNr. 
          EnvOnNr was extended for support of the "LAST" Sunday etc.
          Portuguese Language. Speed optimization.
