
                                   Timer
                                Version 3.5
                      Stopwatch/Countdown Timer/Alarm  
                       Copyright (c) Cyber Solutions
                                1992 - 1995


Timer was conceived while waiting in the phone queue to Microsoft's 
technical help line.  I was beginning to wonder how long I had been 
on hold, and why there wasn't a simple program to...

Timer consists of two timers (stopwatches), a countdown timer, an 
alarm with a pop-up message capability and a provision for setting 
the system time and date.  It was written in Visual Basic Ver 3.00 
and therefore REQUIRES the presence of the VBRUN300.DLL library in 
your Windows or Windows/System directory in order to run.


                   -------- REVISION HISTORY --------


Version 1.5 adds these features to version 1.0:

Both of the timers now have split time capabilities.
Timer1 now has the capability to track cost in dollars or cents per 
 hour or minute.  This can be handy for tracking the on-line charges 
 you've racked up.

Version 2.1 adds these features to version 1.5:

The ability to have Timer beep on the hour, half hour, or both.
The hour and/or half hour beeps can be set to occur automatically
 on startup.
The beep is accompanied by a pop-up message box with the current 
 time.
The timers will keep running even with a DOS application running 
 full screen.

Version 3.0 adds these features to version 2.1:

The ability to include DDE (Dynamic Data Exchange) links to the 
 timers, cost function, and current time in another application such 
 as Microsoft Excel. 

	** This capability is very powerful as it allows Timer to
	   insert time and/or dollar values directly into your
           other applications on a real-time basis.

The ability to assign WAV files to the alarm, countdown, and 
 hour/half hour beeps.

Version 3.5 adds these features to version 3.0:

The capability to log Timer's activities to a text file by:
	Entering a file name of your choice
	Selecting from a list of existing log files
	Selecting a file name representing the current date
File Log can include Project Names by:
	Allowing you to enter your desired project name, or
	Allowing you to select from the previous 10 project names 
         entered
File Log includes:
	Project Start and Stop times 
	Annotations (notes) you can enter at any time	
	Elapsed time on Stop/Restart
	Accumulated cost on Stop/Restart
The ability to automatically run a program at specified time by 
 assigning it on the alarm setup screen
The capability to retain the state of previous settings such as:
	Log File name
	Log File viewer
	File to run
	Last 10 projects and last project selected
	Last alarm time
	Status of hour/half hour beeps
	Project cost per unit time
	WAV files assigned to alarm, countdown timer, beeps, etc.
	12/24 hour display 
	Warn before quitting Timer
	Automatic file logging
	Display time in Timer's caption bar, & more



-----------------------------USING TIMER----------------------------


From the main ("Timer") window, the alarm set window may be popped 
up, the alarm can be turned on or off (assuming an alarm time has 
been set), the timers may be started, the countdown timer window may 
be opened, the system time/date set window may be activated, a 
12-hour time format may be selected (24 hour is the default), and 
you may have the time displayed in the caption bar.  If the time is 
displayed in the caption bar, it will also be visible below the icon 
when the window is minimized.  Note that when a window has both 
"close" and "quit" buttons, the quit button will shut down the 
entire program while the close button only shuts down the current 
window.  Thus, you can start a timer and close down the main window 
to reduce screen clutter.  In order for the alarm to be active, 
however, the main window must be active; i.e., it can be minimized 
but must not be closed.

The timers can be started/stopped/restarted, etc. just like a 
stopwatch.  The timers can also be stopped/started by clicking on 
the stopwatch icon in the Timer1 or Timer2 windows.  The stopwatch 
time may be displayed in the caption (and under the icon when the 
window is minimized) by clicking on the words "Elapsed Time:" in the 
timers or on "Time Remaining:" in the countdown timer.  You also 
display the current time in the title bar by clicking the "Current 
Time" text in any timer.  Timer1 also has the capability to display 
the accumulated cost in the title bar and under its icon by 
clicking  the "Current Cost" text.  With this version, the timers 
may also be split.  When a timer is split, the time will change to 
red to distinguish it from a timer that is simply stopped.  Timer1 
has the ability to track cost per unit time by clicking the cost 
option button; a window will pop up asking for the cost per unit 
time.  If you wish to set another cost later, simply click the time 
button, then click the cost button again.  The current system time 
may also be displayed by clicking the "Time" check box.  The 
countdown timer starts with a default of 10 minutes and can quickly 
be incremented or decremented in 10 minute blocks by clicking on the 
"+" and "-" buttons.  These buttons will also work while the 
countdown timer is running.  The countdown time can be manually set 
to any time value up to 24 hours.  (OK, so it's actually limited to 
23:59:59.  Big deal.)

The general time format is as follows:
hh:mm:ss or
hh.mm.ss

Time values can be entered in either 24 or 12 hour format (21:00:00 
= 9:00:00 pm) regardless of which format is currently selected.



-------------------------USING THE LOG FILE-------------------------

A Log File may be used to track the activity of Timer1.  Once 
logging is activated, a text file is created which maintains the 
date and time for each Timer1 start, stop, and resume.  Also, the 
current project name, elapsed time and associated cost will be 
recorded in the file each time Timer1 is stopped.  Additionally, 
multiple projects may be tracked in a single file, or individual 
files may be maintained for individual projects or dates.

File Logging is activated by selecting the "Logging" button from 
the main window, and then selecting the "Logging On" radio button.  
If the "AutoLog on Startup" check box is selected on the main 
screen, a log file will automatically be maintained each time Timer 
starts.  Once the File Logging window is open, a variety of choices 
are available.  First, a log file name may be selected.  The 
default file name is the current date in the form MM_DD_YY.TXT; that 
is, July 31, 1995's events would be recorded in a text file named 
07_31_95.TXT.  However, any legal 8-character DOS file name may be 
typed into the Log File Name text box.  Note that the file will 
always be saved with a "TXT" extension.  Also, an existing text 
file may be selected as the current log file by clicking the 
"Browse" button.  This will show a list of all .TXT files in the 
current directory.  All information recorded by Timer1 will be 
appended to the Log File so that any previously recorded information 
is not lost.  A log file whose name appears in the "Log File 
Name" window may also be deleted from disk by clicking the "Delete 
Log File" button; Timer will ask for confirmation before deleting 
the file.  Finally, if the "Retain Log File Name" check box on the 
main window is selected, the last log file name entered will be used 
the next time Timer starts (instead of the default name of the 
current date).

Next, a project name may be selected.  This name will appear in the 
log file each time a significant even occurs (Timer1 start, stop, 
resume, close, elapsed time/cost logging, etc.).  Timer will 
remember the last 10 project names entered, and will allow you to 
select from the list by simply clicking down arrow to the right of 
the "Project Name" box and clicking on the project name of your 
choice.  Note that either the "OK" or the "OK & Close" button must 
be clicked in order for the Log File Name and Project Name to be 
accepted and remembered by Timer.  The only difference between the 
two buttons is that the "OK & Close" button closes the File Logging 
window to reduce screen clutter; it may be reopened from either the 
main window or the Timer1 window.

Notes may also be entered into the log file by simply typing the 
text of the note into the "Log File Note" window and then clicking 
the "Write Note to File" button.  This feature helps to annotate 
exactly what tasks are carried out on a particular project in 
addition to the total elapsed time/cost of the project.  It is also 
useful to record ideas or notes related to the current project for 
future reference.

The current log file may be viewed at any time by clicking the "View 
Log File" button.  The default viewer is Windows Notepad, but you 
may select another text viewer by clicking the "Change Default 
Viewer" button.  You will be presented with a screen which allows 
you to enter the path and name of the viewer you wish to use.  
Alternatively, you may browse for the desired file by clicking on 
the appropriate drive, directory, and file boxes.  Regardless of the 
viewer being used, it must be noted that the viewer will only 
present a snapshot of the log file at the time it was opened.  That 
is, the viewer will not automatically update as the log file 
changes; it must be closed and reopened in order to view the current 
state of the log file.

The log file consists entirely of text, and has some symbols to help 
you visualize the logging sequence.  Each time the Timer1 window is 
opened, a ">" symbol appears in the log.  Each Time the Timer1 
window is intentionally shut down via the "Close" or "Quit" buttons 
on the Timer1 form, a "<" symbol appears in the log file.  If 
Windows crashes or the entire Timer program is shut down without 
explicitly stopping Timer1, the "<" symbol will be absent; this 
gives an indication that the logging may have terminated 
abnormally.  In addition, each time a project timer is started, a 
single line divider is logged, and each time a project is stopped, a 
double line divider is logged.  This helps to separate one project 
from another as the following example illustrates:


07-23-1995    12:30:09      Timer Log Started
>
----------------------------------------------
07-23-1995    12:30:20      HL&P Consulting Started
07-23-1995    12:31:12      Log Note      Determine safety factor adequacy
07-23-1995    12:58:15      HL&P Consulting Stopped
Total Elapsed Time:         00:27:55
Total Accumulated Cost:     $34.90
==============================================


----------------------------------------------
07-23-1995    13:00:42      Barker & Smith Started
07-23-1995    13:01:23      Log Note      Initial Phone Call
07-23-1995    13:04:07      Log Note      In meeting - no contact
07-23-1995    13:04:10      Barker & Smith Stopped
Total Elapsed Time:         00:03:28
==============================================


----------------------------------------------
07-23-1995    13:25:28      Barker & Smith Restarted
07-23-1995    13:26:52      Log Note      Received Info, meeting Mon, 14 August
07-23-1995    14:27:10      Timer Program Closed
Total Elapsed Time:         01:01:42
==============================================
<


Note that the first project is tracking cost as well as time, while 
the second is only tracking time.  Also note that the single and 
double lines offset the projects from each other.



--------------------Dynamic Data Exchange (DDE)---------------------

DDE allows you to actively "link" the data from one application to 
another.  For example, you can start Timer to track the cost of a 
project, and have the cost displayed in a cell of an Excel 
spreadsheet.  The cost in the spreadsheet will update along with the 
value in Timer itself.  A sample spreadsheet written in Excel 4.0, 
DDEXMPLS.XLS, is included to demonstrate how this works.

In order to use DDE, you must define an Application, a Topic and an 
Item in the client application (i.e., the application where you want 
the linked data to appear).  The item of interest is then referred 
to in Excel (or other DDE-aware application) as: 
Application|Topic!Item.  The application name in this case will 
always be Timer35s.  The Topic will be Timer_1, Timer_2 or Countdown 
for the first and second stopwatches and the countdown timer, 
respectively.  The item names and the Timer object they refer to are 
listed below:

Item            Timer object

Timer1Delta     First stopwatch time
Elapsed         The label "Elapsed Time:"
Current1        Cost or current time
Current         "Current Cost:" or "Current Time:" (as selected in 
                first stopwatch)
         
Timer2Delta     Second stopwatch time
Elapsed         The label "Elapsed Time:"
Current1        Current time
Current         The label "Current Time:"

Timer3Delta     Time remaining in countdown timer
Remaining       The label "Time Remaining:"
Current1        Current time
Current         The label "Current Time:"

As an example, if you wanted the stopwatch time from the first timer 
to appear in cell B4 of an Excel spreadsheet, you would enter the 
following formula in cell B4:

=Timer35s|Timer_1!Timer1Delta

(note that the Excel cell must be formatted to display time as 
opposed to, say, a dollar value).

If you wanted the value of the current cost from the first timer to 
be displayed in cell C5, you would enter the following formula in cell C5:

=Timer35s|Timer_1!Current1

These values may then be used in the spreadsheet for calculations, 
conditional checks, etc.  Note that Timer must be running and the 
appropriate window must be open (stopwatch, countdown timer, etc.) 
before the formula is entered or before a spreadsheet containing the 
formula is opened in order for Excel to be able to locate the 
appropriate values.  For more information, see the manual for your 
specific DDE-aware application.  


-------------------------ADDITIONAL NOTES---------------------------

Timer saves all the information it needs to remember in a file named 
TIMER.INI.  This file resides in the same directory as the 
executable (TIMER35S.EXE).  This scheme allows you to have multiple 
copies of Timer in different directories, each with its own set 
memorized parameters.  This in turn allows you run multiple copies 
of Timer ON THE SAME COMPUTER AT THE SAME TIME, with each one 
tracking different jobs.

Timer will also let you monitor your System Memory, GDI Memory, USER 
Memory, System Resources, and the number of tasks running.  This 
information is available at any time by calling up the "About" screen.  
Also, for those of you with enough fortitude to read this far, any 
of these values can be monitored continuously by simply clicking on 
the text referring to these values.  That is, if you click on the 
text "Tasks Running" on the "About" screen, the number of tasks 
running will appear in the title bar of the window.  Then, you can 
minimize the window and the same information will be displayed for 
you continuously in the caption of the icon.  This allows you to 
monitor your memory/system resources and number of tasks running 
dynamically as you make changes.



Assigning WAV files to Timer's alarms

Timer now allows you to assign WAV sound files to events instead of 
the standard system beep, provided that your system has the 
appropriate hardware to play such files.  You may assign a separate 
sound for each of the following: the alarm function, the hourly 
beep, the half-hour beep, and the countdown complete beep.  The WAV 
files to be used for these events may be in any directory on your
hard drive as long as Timer can find them.  The sound assignments are
saved to disk so that they will automatically be assigned on subsequent
Timer starts.  Note that if you add or delete WAV files from the 
directory where Timer thinks they are after you have saved the sound 
assignments, you may get unexpected results; the sounds may have to 
be reassigned under these circumstances.  Timer comes with a few 
sample WAV files for you to try, but the Timer.ini file, which 
stores the assignments for the sound files, is initially set for the 
standard system beep on all events.  A wide variety of WAV files may 
be found on local bulletin boards or national services such as 
America Online.

*** NOTE ***

DO NOT rename the executable to TIMER.EXE.  Windows 3.1 refuses 
to run any program with that name (Microsoft's response: "Yeah, 
that's a bad name in Win 3.1").

This program is shareware; you are given a free three week trial
period to determine if Timer is useful for your purposes.  If you
decide to keep the program, you must register it by sending $25.00 to
the address at the end of this file.  Registered users will receive
a disk with the latest version of Timer (without the introductory
"nag screen") along with some of our other shareware programs.  You
may freely distribute Timer as long as no fee is charged for it
other than a nominal fee for the media (not to exceed $5.00).  Timer
is copyrighted software and as such may not be altered in any way,
and must be distributed with all files intact.  Timer consists of
the following files:


            TIMER35S.EXE             89,126 bytes
            README.TXT               20,037 bytes
            DDEXMPLS.XLS              3,825 bytes

Even if you decide not to keep Timer, please send any comments, 
questions, gripes, or suggestions that you may have.  We are
especially interested in the discovery of any bugs or inaccuracies, 
as well as suggestions for features you would like to see in future 
versions.

INTERNET: gries@aol.com
AMERICA ONLINE: gries
COMPUSERVE: 102222,10

Special thanks to my wife Shannon for support, 
encouragement, ideas, and findin' all them bugs.

Thanks to Dennis Sandoval for suggesting some added features.

-------------------------------------------------------------------
Here it comes, the
-------------------------------------------------------------------

LEGAL STUFF

                            W A R R A N T Y


Timer is provided AS IS without any warranty, express or 
implied.  This includes without limitation the fitness for a 
particular purpose or application and any warranties of 
merchantability.  

While I tried to be as thorough as possible while debugging Timer,
Cyber Solutions/Brian Gries shall not be liable for any damages, 
whether direct, indirect, special, or consequential arising from a 
failure of this program or accompanying files to operate in a manner 
desired by the user.  Cyber Solutions/Brian Gries shall not be 
liable for any damage to data or property which may by caused 
directly or indirectly by use of this program.

In no event will Cyber Solutions/Brian Gries be liable to you for 
any damages, including any lost profits, lost savings or other 
incidental or consequential damages arising out of your use or 
inability to use the program, or for any claim by any other party.

In other words, I'm not responsible for anything.  Nothing, zero, 
zip, zilch, the natural log of one, and the number of sentient beings 
in Congress.  But I hope you enjoy it anyway.



 
              Timer is Copyright (c) 1992-1994 by

                 Cyber Solutions/Brian Gries
                        303 El Toro Ln
                      Webster, TX  77598
                        (713) 286-4414
 
                     All Rights Reserved

          