UpAboutMore


Time Tracker

Wizard Card  -  Volume 12  -  Mr. Wizard Number 1  -  Sat, Feb 17, 1990 02:52 AM




In this month's installment of Mr. Wizard, we present a stack that is much less entertaining than usual, but is at least useful. Of course that makes it doubly inappropriate, but bear with me: I've not been feeling well.

Like the popular Button Board, the Time Tracker is a one card stack that was designed, written, and debugged in about an hour. I've been using it to keep track of my time expendatures on that billing package I've been lingering over for the last eight months. This stack is very simple and it works quite nicely!

WHAT IT DOES

The time tracker maintains a record of work done on a project which can be used to prepare a bill. Each entry lists the date the work was done on, a brief description of the work, and the number of hours rounded to the nearest half hour. The program automatically calculates a charge based on a constant rate defined inside the script (I use the absurd rate of $20/hour). The program also maintains a running total of the total hours and total charge. The complete record of activity is displayed in a scrolling field and can also be printed out to an imagewriter.

To use this gem, just launch the stack and push the NEW ENTRY button. You will be asked for the date of the work (the current date is provided as a default), a brief description, and the total number of hours (the default here is the number of hours since your Mac was last restarted). You can push Cancel buttons at any point if you change your mind (this is always good programming practice). As soon as you answer the third question, an entry line is formated, added to the end of the list, and the totals are updated. The whole process takes only a few seconds.

Whenever I finish another bit of work for the project, I quickly zip into this stack, push the NEW ENTRY button, and enter the description. I always know exactly how much time I've put in and by looking back over the record I can trace my abominable work habits and figure out at just what point the project got out of hand. For your added amusement, I refrained from pushing the CLEAR button so that you can also trace my abominable work habits.

This stack could be used for keeping track of all sorts of projects. If you want to keep track of more than one project at a time, simply make as many copies of the stack as you need and name each one appropriately.

HOW IT WORKS

This stack couldn't be much simpler. Essentially, all the work is done by the script of the NEW ENTRY button, and even that script is fairly short. The script simply asks the three questions, forms the answers into a single line, appends and updates. If you want to change the $20/hour rate, simply change the number inside this script. Look it over; it's an excellent example for beginning HyperTalk scripters.

The other buttons are even simpler. The QUIT button is a one line script. The CLEAR button asks you if you're sure before it clears the various fields (about half a dozen lines). And the PRINT button prints headings and does a little minor formatting so that the information will look nice on the page. Incidentally, the printing is made possible by an XCMD placed inside the stack.

ASSIGNMENT

In order to make this stack your own, you should replace the little "John Cartan" signature at the top of the screen with your own logo.

My signature is an ordinary bitmap painting and may be erased with an ordinary eraser. First, summon the menubar by typing COMMAND-SPACE. Under the TOOLS menu you will find the eraser on the third row between the paint brush and the line tools. Select the eraser and then rub out my signature.

Now you'll need to put something in it's place. One possibility is to simply select the typing tool (the A in the lower left corner of the tool menu), click at the top of the screen, and type your own name. You can make it look fancy by first selecting TEXT STYLE under the EDIT menu and choosing a large size and a fancy font. You could also turn on outlining or shadow. OR you could use the paint brush or pencil to sign your name in your own handwriting. Experiment! If anything goes wrong you can always use the eraser.

Another possibility is to make a nifty logo using a paint program like MacPaint or SuperPaint, and then transfer it in. There are several ways of doing this, but perhaps the easiest is simply to call up the logo, COPY it, return to the Time Tracker, and PASTE. Nothing you do with the paint tools will affect the program in any way. The eraser won't erase any of the buttons or fields. The title logo is purely decorative.

Even if you're not charging anyone for your time, you should be able to think of something you could do with this thing. If you find this stack useful, let me know. Next month I'll try to get back to something of no apparent redeeming value.




UpAboutMore