
                    HP ALARM CLOCK V1.1
           (c)1998 Jorgen Wallgren, Singapore
                 e-mail: jorgen@palmtop.net


PLEASE READ THIS DOCUMENT BEFORE YOU INSTALL HP ALARM CLOCK!

You will then know how to fully use this program.  Observe that
you stop an alarm with the {END} key  -- which on the HP100/
200LX is reached by pressing {FN}+{RIGHT ARROW}

IF YOU HAVE HP ALARM CLOCK V1.0 ALREADY INSTALLED, THEN PLEASE 
REMOVE YOUR INSTALLATION AND ALL THE FILES INCLUDING THE
C:\_DAT\HPALARM.ENV BEFORE YOU INSTALL THIS NEW VERSION. 
OTHERWISE YOUR PALMTOP WILL HANG THE FIRST TIME YOU RUN THIS 
NEW VERSION.

FOR INFORMATION ABOUT NEW FEATURES IN THIS VERSION, PLEASE LOOK 
IN THE SECTION CALLED "REVISION HISTORY" IN THE END OF THIS 
DOCUMENT.

HP ALARM CLOCK is a System Manager (EXM) clock program which has
a high resolution display of the time.  It allows an alarm to be
set which will sound even if you close the program and even if
you turn off the HP200LX.  However, if you have terminated the
Systems Manager by using the {&...} {Menu} [A]pplications
[T]erminate all key sequence, the Alarm will not sound.

The Usual Legal Stuff:

HP ALARM CLOCK is Freeware for the HP 100LX/200LX Palmtop PC's.
As Freeware, it may or may not be supported in the future.  This
program is Free, and you may do what you want with it, as long
as you do not change anything in the program.  You may
distribute this program, as long as it is distributed as a
compressed file named HPALARM.ZIP.  It must contain the
following files:

 HPALARM.EXM
 HPALARM.ICN
 HPALARM.TXT

I will not be responsible for any damages, including but not
limited to data loss or your not waking up in time for a
important meeting.  It is highly recommended that you backup all
data in your computer regularly, and that you make sure that the
alarm in HP ALARM CLOCK is set correctly.  In other words, you
are responsible for any damages that may result if you decide to
use HP ALARM CLOCK.  I -- the author -- am not.



INSTALLATION:

You can install and run an EXM program such as HP ALARM CLOCK in
many different ways.  However, I strongly recommend that you
follow this installation procedure:

1.  Copy HPALARM.EXM & HPALARM.ICN to your C:\_DAT directory.

2.  Go to the System Manager (Press the {&...} key.)

3.  Press function key F2 - Add.

4.  Now you fill in the following fields with:
    Name:  Clock (This fits in nicely with the Systems
              Manager icon.)
    Path:  C:\_DAT\HPALARM.EXM

5.  Tab to the Icon Field, and press the Up or the Down arrow
    key until HP ALARM CLOCK's Icon appear.

6.  Press F4 - Set Key

7.  Press {ALT}+{ApptBook key} (the green key with an clock icon
    located below function key F1).

8.  Press F10 - OK

Your installation is done!  You can now activate HP ALARM CLOCK
with the {ALT}+{ApptBook} key combination.



How to use HP ALARM CLOCK:

When you activate HP ALARM CLOCK, you will see the following
functions in the main screen:

F1 - Help.  This gives you a basic introduction to using the
program.

F2 - Alarm.  Accesses the Setting menu.  More information on
this function is provided below.

F3 - Volume.  Sets the Alarm volume.  The choices are Off, Low,
Medium and High.  Each time you press F2 - Volume, the volume
will increase, or after reaching High, go to Off.  You will hear
a beep.  The current volume setting is displayed on the Icon in
the lower left corner of the HP ALARM screen.  This setting will
only effect the Alarm Clock volume.  It is independent of the
volume which you have set for your palmtop.

F9 - Setup.  Accesses the Configuration Menu.  More information
on this function is provided below.

F10 - Quit.  Closes the HP ALARM CLOCK display.  It does not
disable the Alarm function.

You can also access these functions via the pull-down menu
activated by pressing the Menu key or ALT key.


CONFIGURING THE HP ALARM CLOCK:

You can configure HP ALARM CLOCK according to your preferences.
The program will use either the 12 Hour or the 24 Hour mode,
depending on which mode has been selected from the System
Manager Set Up menu.

The configuration menu screen is divided into two areas - "Clock
Design" and "Alarm Settings".

CLOCK DESIGN

In the "Clock Design" area you will find 5 check boxes.  They
allow you to enable or disable:
 Leading Zero
 Flashing Colon
 Clock Tick
 Show Date
 Time-Out

LEADING ZERO:  If checked, a zero is displayed in front of
single digit times.  For example, 1:30 will be displayed as
01:30.  If unchecked, 1:30 is labeled 1:30.

FLASHING COLON:  If checked, the colon between Hour and Minute
will flash once every second.  If unchecked, the colon will
always be displayed.

CLOCK TICK:  If checked, a tick is heard every second.  If
unchecked there is no tick.

SHOW DATE:  If checked, the current date is displayed in the
upper left corner of the screen.  If unchecked, it is not.

TIME-OUT:  When you are operating on batteries, the HP 200LX
will go to sleep after 3 minutes, just as if you had pressed the
Off key.  HP ALARM CLOCK allows you to change the interval for
this time out.  If you check this option, the palmtop will
remain on for the time you select while HP ALARM is the active
program.  Pressing F6 (labeled "T-out+") will increase the
time-out interval in 1 minute increments up to 10 minutes, then
in 5 minute increments up to 60 minutes.  After that, it cycles
back to 1 minute.  If the box is unchecked, the system default
time out is in effect.  This function has no effect when HP
ALARM CLOCK is not the active program.  This function also does
not control the time-out period while the Alarm is sounding.
That time-out is controlled in the ALARM SETTINGS area.

ALARM SETTINGS

In the "Alarm Settings" area you have a "Time-out" field with 2
radio buttons labeled "No" and "Yes: 30 minutes".  You also have
2 check boxes labeled "Flash The Screen" and "Enable ESC Key".

TIME-OUT [No & Yes:30 minutes]:

   - - - You have to be careful with this Function! - - -

If you chose "No", the palmtop will not time-out (switch off)
when an alarm is sounding.  The alarm will continue until you
switch it off, or until the batteries are empty.  Normally, you
should use the "Yes: 30 minutes" option, which means that the
alarm will sound until you switch it off or until the Time-out
time is reached.  It also means that you will not drain both
your main and your back-up batteries.

If you sleep through the alarm for the period you specify (30
minutes is the default) the palmtop will go to sleep --
following your example.  You can set this time by pressing the
F3 function key which will cycle upward through the choices. The
values are 1 - 10 minutes and then 10 - 60 minutes in steps of 5
minutes.

FLASH THE SCREEN:  If checked, the screen will flash (between
normal and inverted) during alarm.  If unchecked, there is no
visual alarm indication.  This is useful if you are in a meeting
and do not want to disturb others.  Set the Volume to no sound
(F2), and check this option). WARNING- if you use BUDDY and have
checked BUDDY's option "Maintain video invert mode (On-/)" (in
Global Preferences) you have to un-check this option. Otherwise
your screen will be inverted after you have switched off an
alarm and exit HP Alarm Clock.

ENABLE ESC KEY: If checked, you can disable an alarm with the
ESC key also. Otherwise you can only disable an alarm with 
the "END" key ({Fn}+{Right Arrow Key}).

When you have set your required configuration options, you can
confirm them either by pressing the Enter key or by pressing the
F10 "OK" function key.  If you wish to cancel your choices,
press F9 "Cancel" or the ESC key.

SETTING OF THE ALARM MENU:

To set an alarm, press the F8 "Alarm" function key in the main
screen.  In the "Setting Of The Alarm" menu, you will see a box
which contains the time to which the alarm is set.  To the left
of this box is a check box labeled "Alarm On"  To the right is a
check box labeled "Snooze On:15".  If your palmtop is configured
to use 12 hour mode, you will see an AM/PM indicator on the
upper left side of the alarm time box.  Below the alarm time is
a field called "Days In Week" and this field has 7 check boxes
labeled Monday - Sunday.  Seven function keys are labeled:

F2 - "Alarm", will check and uncheck the "Alarm On" check box.
If checked, the alarm will sound at the time specified.

F4 - "Set Hrs" will set the hour portion of the Alarm Time. Each
press of this key will increase the time set by one hour.

F5 - "Set Min" will set the minutes portion of the Alarm Time.
Each press of this key will increase the time set by one minute.

F7 - "Snooze" This button will check and uncheck the "Snooze
On:15" check box.  If checked, the Space Bar will suspend a
sounding alarm for the number of minutes shown.  After that
time, the alarm will begin to sound again.

F8 - "Snooze+" will increase the Snooze time displayed after the
"Snooze On" check box.  This time can be set from 1 to 10
minutes and then 10 to 60 minutes in steps of 5 minutes.

F9 - "Cancel" will cancel any changes made in the current Alarm
Setting session, and restore your most recent settings.

F10 - "OK" will confirm your setting and exit the menu.  If you
have set the alarm, it will sound at the set time.

In the field called "Days In Week" you have check boxes for
Monday through Sunday.  You check the boxes for the days of the
week that you want the alarm to sound.  For example, if you set
the alarm to 7:30 AM in order to wake up and go to work, but you
do not work on Saturday and Sunday, you check the boxes marked
Monday to Friday and leave Saturday and Sunday unchecked.

When you have set an alarm, the icon above the Volume icon in
main HP ALARM CLOCK screen will look like a target instead of a
like simple dot.  The alarm time you have set will be displayed
above the F8 - Alarm key label.

DIRECT ENTRY OF ALARM TIME

You can also enter the Alarm Time directly using the numeric key
pad.  At any time when you are in the Alarm Menu, pressing a
number in the numeric key pad will insert that number at the
left-most position of the alarm time where it is can express a
valid time.  To set the alarm for 1:00, you must begin with the
leading "0".  However, to set it for 7:30, you just type 7, 3
and then 0.  If you have configured your system for 12 hour
mode, you toggle between AM & PM, by pressing "/"(located to the
right of the "9" key.)



HOW TO USE HP ALARM CLOCK:

When you set an alarm in the Appointment Book or in the Stop
Watch, the set alarm time will be saved in a configuration file.
HP ALARM CLOCK also works this way.  There is one big
difference. If you terminate the System Manager (SysMgr) and go
to DOS, all set alarms are canceled.  When you start SysMgr
again, it checks to see if any alarms were set in the AppBook
and Stop Watch, and resets them.  SysMgr can not, however, reset
HP ALARM CLOCK alarms, since this is a feature built-into the
SysMgr.  You must do this yourself.

If you terminate SysMgr and later restart it, you MUST start HP
ALARM CLOCK in order to reactivate the alarm.  You do not need
to access the Alarm Menu or Set Up Menu.  It is sufficient to
restart the program.  If the alarm was canceled, you will hear a
short beep which confirms that an alarm was set earlier but can
not be found.  It is reset.

You can switch to other programs such as Memo, Phone Book
e.t.c., without closing the program.  You can also exit HP ALARM
CLOCK using F10 - Quit after you have set an alarm.  You can
even turn the computer off.  The alarm will turn on the computer
if needed, restart the program, and sound.

When you hear an alarm, there are 2 ways to stop it.  You may
either press the ON/OFF key (which will only switch off the
palmtop, but not cancel the alarm) or you press "END"
({Fn}+{Right Arrow Key}).  If you have enabled the Snooze
feature, pressing the Space Bar will suspend the Alarm.  It will
start again after the selected Snooze time.  If you have
activated a Snooze alarm, it will be canceled if you exit HP
ALARM CLOCK.  While the alarm is sounding, you can not switch to
another application by using a hot key.



TECHNICAL LIMITATIONS:

1.  You may have problems with key remapping.
2.  You can not have a System Macro running within HP ALARM
    CLOCK.

Note the entries "DO_NO_EVENT" and "m_flush_kb()" in this of the
code section:

 while( !Done ) {
     app_event.do_event = DO_NO_EVENT;
     m_action( &app_event );
     switch( app_event.kind ) {
             .
             .
             .
             .
         case E_KEY:
              SendMsg(GetFocus(),
KEYSTROKE,app_event.data,app_event.scan);
              m_flush_kb();
              break;
             .
             .

Normally, in SysMgr you get NULL events every 1/2 second and
that will give us a uneven display of the seconds in HP ALARM
CLOCK.  By using DO_NO_EVENT this artifact is fixed.
Unfortunately, pressing a key not used in the program would then
result in the program hanging.  I fix this by flushing the
keyboard with m_flush_kb();.  That is why we can not run a
System Macro from within the program.  If you know how to fix
this in another way, your help would be highly appreciated!

The SysMgr can queue an alarm for any time in the future.  The
system alarm queue size is set to 5.  The AppBook will have 1
alarm, the Stop Watch can have up to 2 alarms so 2 more alarms
can be in the queue.  Using HP ALARM CLOCK will take the 2
remaining positions in the queue - alarm & Snooze alarm.  As far
as I know, if you add an additional 3rd party EXM program which
support alarms, there may be some problems with the alarms. I
may be wrong here and if so, please let me know.

BUG REPORT:

If you find any bugs, please report them to me:
jorgen@palmtop.net

REVISION HISTORY:

Version Alpha  The first version tested only by me.

        Beta 1 The first beta test version.  Released to a beta
               test group.

        Beta 2 Following modifications were made:
               * Added a default configuration.
               * Option for flashing screen during alarm.
               * Local time-out of the program.
               * Display of the set alarm time above the alarm
                 menu key.
               * Fixed a problem which may occur when EXP modem
                 is inserted.

        Beta 3 Last released version for testing.  Searching for
               a bug which may cause the program to hang.
               * Cancellation of Snooze alarm when new alarm is
                 set.
               * Fixed bug that cause the program to hang.

               The 22nd of March 1998        
        1.0    Released version- S.U.P.E.R page at:
               http://www.palmtop.net

               The 23rd of April 1998
        1.1    * Fixed a bug which disabled the snooze function
                 after 12:00 noon when using 12 hour mode.
               * Moved the Alarm function key from F8 to F2.
               * The alarm time indication in the main window 
                 will now follow the Leading Zero option in the 
                 configuration.
               * Added indication of which day the next alarm is
                 set.
               * Switched position of the Volume and Alarm 
                 icons.
               * Moved the set alarm time indication to the 
                 lower left corner.
               * Added a pull-down menu.
               * Added the ESC key as an option to stop the 
                 alarm.
               * Fixed so TAB key will work with the check boxes
                 in the configuration menu.
               * Changed the configurable snooze time to 1- 10 
                 minutes and after that 10- 60 minutes in steps 
                 of 5 minutes.
                 

SPECIAL THANKS TO:

Without Toshiki Sasabe, Nan-shan Chen and the unknown author of
NKIT I have never been able to do this program - THANKS!!! NKIT
is a great tool for making EXM programs and Toshiki helped me
with several functions which I could not be without.  Nan-shan
Chen gave me many idea's how to solve problems using C
programming. Lynn M. Cavendish helped me to edit this document-
thanks! 

Jorgen Wallgren
[jorgen@palmtop.net]
[wallgren@singnet.com.sg]

April 1998.
