home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
616.lha
/
Notify_v1.01
/
Notify.Doc.pp
/
Notify.Doc
Wrap
Text File
|
1992-03-03
|
19KB
|
386 lines
NOTIFY
------
Version 1.01 - January 1992
Copyright © Michael Tanzer, 1991, 1992
+---------------------------------------------------------------------------+
| N O T I C E |
| |
| Freely distributable. Not to be used for commercial purposes without |
| written consent from the author. Not to be distributed without this |
| notice and accompanying components intact. |
| |
| This product is distributed on an 'as-is' basis, with no warranty of any |
| kind, either express or implied. No responsibility whatsoever is assumed |
| by the author for the use of this product, nor for any results of its |
| use. No claim whatsoever is made as to this product's accuracy, useful- |
| ness, completeness, nor suitability to any purpose. |
| |
| Components include the following files: |
| Notify.Doc (this document) |
| Notify |
| NotifyTimer |
| NotifyNoise |
| NotifyDaily |
| NotifyChime |
| Notify_Add.info |
| Notify_List.info |
| NotifyDaily.info |
| NotifyChime.info |
| Notify.Doc.info |
| Install_Notify |
| Install_Notify.info |
| |
+---------------------------------------------------------------------------+
Syntax:
-------
The symbols '<' and '>' are used in this document to enclose optional
parameters, i.e. those that may be but need not be specified. Strings that
must be specified verbatim are shown in upper case; parameters are shown in
lower case. For example, the line:
RX NOTIFY ADD time <message text>
indicates that 'RX NOTIFY ADD' must be entered as shown (although not neces-
sarily in upper case), 'time' is a required parameter, and 'message text' is
an optional parameter.
What is NOTIFY?
---------------
NOTIFY is a suite of Rexx programs that can be used to issue messages or run
commands automatically at certain times of day. Messages can be added 'on
the fly', or can be entered into a file to be read in periodically. When it
is time for a message to be issued, a requester appears on the screen
containing the current time and the message text; these may also be spoken
via the SAY command. If the first word of a message is 'CMD', it will be
treated as a command which is issued to Amiga DOS. Facilities are provided
for the adding, editing, and deleting of messages, and for displaying the
times and texts of pending messages. You may also arrange for the current
time to be announced at regular intervals.
Components of NOTIFY include:
Notify
This program controls the adding, editing, and deleting of messages for
specific times of day. It also enables pending messages to be displayed,
and can be used to control whether times and messages will be spoken.
NotifyTimer
This program is launched asynchronously (by Notify) for each message.
It waits until the appointed time, then displays a requester showing the
time and message text. If messages are to be spoken, it also invokes
NotifyNoise. If messages begin with 'CMD', it directs them to Amiga DOS.
You should not invoke this program explicitly.
NotifyNoise
This program invokes the SAY command (usually in the Utilities directory)
to announce times and message texts. It is invoked by NotifyTimer and
NotifyChime.
NotifyDaily
This program reads a file (usually s:NotifyDaily.data) which contains
messages which are to be issued on certain days. It invokes Notify to
add each message to the list of pending messages for the current day.
NotifyChime
This program invokes NotifyNoise at regular intervals. By default, it
causes the time to be announced every hour.
These programs must be copied into the directory to which rexx: has been
assigned. This can be done by double-clicking on the 'Install_Notify' icon.
Why use NOTIFY?
---------------
NOTIFY provides the ability to handle any number of messages (storage
permitting) with a minimum of effort. NOTIFY requests can be made from the
command line or with (naturally enough) requesters. Messages can be issued
on specific dates, certain days of the month, or certain days of the week.
Best of all, NOTIFY is written in Rexx, so if you want to add or change a
feature, you can do it easily. And it's free.
What you need in order to use NOTIFY:
-------------------------------------
You must have the following libraries in your LIBS: directory:
rexxsyslib.library
rexxsupport.library
rexxarplib.library
arp.library
These are available from a variety of sources and are not distributed with
NOTIFY.
How to use Notify:
-----------------
Edit Notify and check the setting of the variable 'twentyfour'. If you want
message times to be displayed in 12-hour format, set this variable to 0; for
24-hour format, set it to 1.
To run Notify, enter:
RX NOTIFY <request <parameters>>
The following requests may be specified:
ADD time <message text>
This adds a message to the NOTIFY message list. The time can be either
a time of day or 'NOW' which causes the message to be issued immediately.
The message list is kept in environment variables. You may always use a
12-hour format for the time if you suffix it with 'am' (or 'a') or 'pm'
(or 'p'). If 'twentyfour' is set to 1, all times entered without a
suffix are assumed to be in 24-hour format. If 'twentyfour' is set to 0,
times entered without a suffix but with hours greater than 12 are assumed
to be 'pm'; any time between 1:00 and 12:59 is assumed to be for the next
occurrence of that time. For example, if 'twentyfour' is set to 0 and
the current time is 3:30pm,
3:31 = 3:31pm
3:29 = 3:29am (the following day).
If the current time is 11:30am,
12:00 = 12:00pm (noon)
11:00 = 11:00pm.
If a time is not specified, you will be prompted for one.
The message text is optional, and may include backslashes (\) to indicate
that the following characters are to appear on the next line.
If the first word of the message is 'CMD', the message will be treated as
a command which is issued to Amiga DOS. You must specify an output
window (or NIL:) for any command that may type output to the screen; this
is necessary because NotifyTimer runs without a CLI. You must also
specify complete paths for commands in directories other than c: and
for operands which indicate files. For example:
RX NOTIFY ADD 9:00 CMD SYS:UTILITIES/CLOCK
causes the CLOCK program to be run at 9 o'clock. Enter:
RX NOTIFY ADD 19:00 CMD RX >NEWCON:0/0/640/200/ MYPROG
to run a Rexx program called 'MYPROG' at 7 pm. Enter:
RX NOTIFY ADD NOW CMD ED S:NOTIFYDAILY.DATA
to edit the NotifyDaily data file immediately. Of course, you always
have the option of modifying NotifyTimer to recognise other keywords or
to perform other tasks.
EDIT msgno
This enables you to change the text of a message in the message list.
Message times, once entered, cannot be changed.
DELETE msgno <msgno <msgno... >>
This enables you to delete one or more messages from the message list.
You may specify 'ALL' to delete all messages from the list.
LIST
This causes a requester to be displayed showing the number, time, and
text of each pending message. Backslashes (\) contained within message
texts are converted to slashes (/) before being displayed. A string
gadget enables you to enter new requests; for example, you may enter LIST
to cause the display to be refreshed. Pressing the return key when the
string gadget is blank (and selected) terminates the display. If there
are more messages than can be displayed on a screen, the string gadget
will contain 'More...'; press the return key for the next screenful of
messages, or clear the gadget by pressing right-Amiga-X to enter a new
request.
LIST is the default request when Notify is invoked.
HELP (or '?')
This causes 'help' information to be displayed.
QUIET
This sets a 'quiet flag' so that messages will be displayed but not
spoken.
NOISY
This deletes the 'quiet flag' so that messages will be spoken as well
as displayed. By default, the 'quiet flag' is not set.
How to use NotifyNoise:
-----------------------
Edit NotifyNoise and check the setting of the variable 'twentyfour'. If you
want message times to be announced in 12-hour format, set this variable to 0;
for 24-hour format, set it to 1. Note that this setting operates indepen-
dently of the same variable in Notify. NotifyNoise uses the SAY command (in
the Utilities directory) to make announcements. If you have moved the SAY
command to a different directory, or prefer to use a different command to
make announcements, you will need to modify this program.
Typically, you would not explicitly execute NotifyNoise (or NotifyTimer).
However, if you want to know what an announcement will sound like, enter:
RX NOTIFYNOISE time <message text>
where 'time' is in 24-hour (hh:mm) format.
How to use NotifyDaily:
-----------------------
Edit NotifyDaily and check the settings of the following variables:
perpetual
If this variable is set to 1, the NotifyDaily data file will be re-read
daily at midnight so that messages for the new day can be added. If set
to 0, the data file will be read only when NotifyDaily is invoked.
dateformat
Set this variable to indicate your preference for date format:
'E' = European (dd/mm/yy)
'U' = U.S.A. (mm/dd/yy)
'O' = Ordered (yy/mm/dd)
You must conform to this format when entering dates in the data file.
datafile
This variable specifies the name of the data file.
Before running NotifyDaily, build a data file as directed below. If this
file cannot be found, no messages will be added.
To run NotifyDaily when the variable 'perpetual' has been set to 0, enter:
RX NOTIFYDAILY
If the variable 'perpetual' has been set to 1, enter:
RUN >NIL: RX NOTIFYDAILY
If you want to invoke NotifyDaily whenever you boot your machine, add one of
the above commands to your startup sequence.
To display a 'help' panel for NotifyDaily, enter:
RX NOTIFYDAILY ?
The format of records in the NotifyDaily data file is:
date time <message text>
The date may be expressed as an actual date (in the format indicated by the
'dateformat' variable) or as a day of the week, as follows:
MON = Monday
TUE = Tuesday
WED = Wednesday
THU = Thursday
FRI = Friday
SAT = Saturday
SUN = Sunday
M-F = Monday through Friday
S-S = Saturday and Sunday
MWF = Monday, Wednesday, and Friday
TTH = Tuesday and Thursday
ALL = Every day
If the date format is used, you may specify a wildcard ('??') for the year,
month, and/or day. The day can be specified as a day of the week; suffix
this with a number to indicate which occurrence of that day in the month.
For example, specifying MON3 for day and wildcards for year and month will
cause the message to be issued on the third Monday of each month.
The time may be expressed either as a time of day or as 'NOW', which causes
the message to be issued when the data file is read. Times not suffixed with
'AM' (or 'A') or 'PM' (or 'P') are assumed to be 24-hour values. Note that
this can have different results if the variable 'twentyfour' in Notify is set
to 0. Messages for the current day whose times have passed will not be added.
Examples:
Assume that 'dateformat' is set to 'E', 'perpetual' is set to 0, and
'twentyfour' (in Notify) is set to 0, and that NotifyDaily is invoked from
the startup sequence.
01/01/?? NOW Happy New Year!
This message will be issued when the machine is booted on New Year's Day.
01/??/?? 10:00am Today is the first day of the month.
This message will be issued at 10am on the first day of each month.
SUN 2:00pm Why aren't you mowing the lawn?
This message will be issued at 2pm every Sunday.
M-F 9:00am cmd sys:utilities/clock digital2
The CLOCK command will be run at 9am Monday through Friday.
31/12/99 6:00 I hope you're going to behave yourself tonight.
This message will be issued at 6pm if the machine is booted after 6am.
FRI/??/97 12:00pm
You will be notified of the time at noon on every Friday in 1997.
TUE1/11/?? NOW Today is Melbourne Cup Day.
This message will be issued when the machine is booted on the first
Tuesday of November. Depending on your time zone, this message may be
too late, and you will have missed the race; consider as an alternative:
MON1/11/?? NOW Tomorrow is Melbourne Cup Day. ...or perhaps:
TUE4/10/?? NOW Next Tuesday is Melbourne Cup Day. ...depending on
whether the first of November falls on a Tuesday.
How to use NotifyChime:
-----------------------
Edit NotifyChime to inspect the variable 'interval' and modify it to change
the default number of minutes per interval. NotifyChime will call NotifyNoise
to announce the current time every so many minutes as indicated by this
variable. If 60 can be divided evenly by the interval, the first interval
will begin at the next occurrence of a number of minutes divisible by the
interval relative to the current hour. For example, if the interval is 15
and Notify Chime is invoked at 9:20, the time will first be announced at
9:30, then at 9:45, 10:00, 10:15, etc. The interval can be left alone in
the program and modified on the command line.
To run NotifyChime, enter:
RX "ADDRESS AREXX NOTIFYCHIME <interval>"
where 'interval' is expressed in minutes. You may enter this command again
at any time if you want to modify the interval. Once NotifyChime is running,
the current interval can be displayed by entering:
RX NOTIFYCHIME STATUS
To terminate NotifyChime, enter:
RX NOTIFYCHIME QUIT
You can also enter:
RX NOTIFYCHIME ?
to display a 'help' panel. If NotifyChime is active, invoking it without
specifying an interval will terminate it. This enables an icon to be used
to 'toggle' the function on and off as required.
Other things you might like to know about NOTIFY:
-------------------------------------------------
Approximately 13K is required to support the task running NotifyTimer for
each message that is added; this task remains active until the time of the
message regardless of whether the message is deleted. Due to the fact that
the RexxSupport delay() function is used to wait for the specified time, the
CPU overhead of this task is negligible.
Similarly, NotifyChime will require a task each time the interval is set. If
the interval is changed, any previously-launched task will run until the end
of its interval before detecting that it has been superseded.
Testing revealed that the delay() function is not accurate; there should be
fifty 'ticks' per second, but I have found this to be out by a factor of
approximately two per cent. Although adequate for short intervals, this
caused longer delays to be over-length by about a minute per hour. To
correct for this, the programs that use the delay() function (NotifyTimer,
NotifyChime, and NotifyDaily) contain loops which wait 90% of the remaining
portion of the interval unless that portion is less than ten minutes. This
technique should ensure that the displaying and/or announcing of messages
will begin within twelve seconds of their specified times.
NOTIFY was developed on an Amiga 500 under Amiga DOS 1.3 version 34.28, using
ARexx 1.15, RexxArpLib.Library 2.52 and Arp.Library 39.1. It has been tested
under Amiga DOS 2.04.
I originally wrote NOTIFY because I wanted to be reminded to do various
things in the course of a day. Setting the CLOCK alarm was unsatisfactory;
no message could be associated with an alarm, only one alarm could be set,
and if I happened to be looking away from the screen when the alarm was
issued, I would miss it altogether. I found certain shareware products to be
useful for keeping track of events occurring on specific days, but I could
miss messages if I booted my machine too late in the day, and adding a single
reminder for later in the same day involved a lot of stuffing around with
the mouse (selecting menu items, gadgets, etc.) and took too much time. I
also found that, since I don't tend to re-boot too frequently in a single
day, the storing of such reminders in a file was an unnecessary waste of
space. Furthermore, I wanted certain messages to be issued on the first day
of each month, others on certain days of the week, etc., and found no
provision for this sort of thing. Worst of all, without the source for these
programs, I was unable to alter their operation to suit my taste. The
special handling of messages beginning with 'CMD' was an afterthought, and
required the addition of only five simple lines to NotifyTimer. I find that
NOTIFY satisfies all my requirements; I hope it satisfies yours.
You are free use NOTIFY for as long as you like and to modify it in any way
that suits your needs, but please do not distribute a modified version.
I do not ask for any remuneration, but if you would like to send me something
(a postcard, a diskette, a cheque in Australian dollars, whatever), I would
be delighted to receive it. I will make a sincere effort to answer any
questions you may have about NOTIFY. My address is:
Michael Tanzer
P.O. Box 289
Carlton North, VIC 3054
Australia
Telephone: +61 3 387 6589
Facsimile: +61 3 388 1863