Fred Condo, Ph.D. Bitnet: condof@clargrad Internet: condof@cgsvax.claremont.edu Voicemail/Fax: +1 818 339-4704 Monday, May 31, 1993 attoClockª 1.2.4 The way-tiny, minuscule, little clock program. Copyright ©1993 Fred Condo, Ph.D. All rights reserved. What it is attoClock is a very small application (6434 bytes) for System 7 that displays a digital clock in a small window. It has intentionally few features. It displays the hour and minute, respecting the time format you have set in your control panels. It doesnÕt display seconds or the date or ring chimes or display movies or pictures or animations. Just the time. The motivation for creating attoClock was that I like having a clock on my screen, but I donÕt want to give up a lot of memory or disk space for the function. I could use the Alarm Clock desk accessory, but it has a larger window, and, if placed at the bottom of the screen, must be moved to access its extra functions. Also, I distrust the extensions and control panels that put a clock in the menu bar. Even with the best efforts of the authors, conflicts among complex extensions occur. A small application that obeys AppleÕs programming guidelines is the least obtrusive way to provide a simple function like this. To keep attoClock as small as possible, it supports System 7 (including 7.0.1 and 7.1 and presumably future versions) only. It will silently quit if it is launched under earlier systems. The name is taken from the metric-system prefix atto-, which means one quintillionth (10-18). ThatÕs very small, but it should not be confused with an attaBoy, which is a small word of praise. Installation attoClock may be placed anywhere on your hard disc or floppy disk (!). A particularly good place for it is in the Startup Items folder within your System folder. Placing it or its alias there will cause the program to open whenever you start your system. Other features Drag the small window by clicking and dragging anywhere inside it. attoClock will remember where you place the window and open it there on subsequent usage. I like to put my clock in the lower right hand corner of my screen, just below the Trash icon. If you really, really need to know the date and seconds, look in the about box. To change the way attoClock displays the time, use the General control panel (Date &ÊTime for System 7.1). It may take several seconds for attoClock to reflect the changes you make there. If attoClock runs out of memory or receives an AppleEvent that it doesnÕt understand, it will notify you. For a memory problem, it will also quit. It understands only the ÒquitÓ AppleEvent. attoClock brings the Finder to the front, but if the Finder launches other applications in the Startup Items folder, then one of them will come to the front instead. Limitations and requirements attoClock uses features that at present are available only in System 7 (this includes 7.0, 7.0.1, and 7.1). It should work on any Macintosh computer that runs System 7. If it doesnÕt, let me know. attoClock has been briefly tested on a Macintosh II running System 7.0.1, and a Macintosh IIcx and a PowerBook 100 running System 7.1. If what you have on the Clipboard leaves under about 100 bytes free in attoClockÕs memory partition, it will fail and crash with a system error. This is an inherent limitation of the Macintosh operating system and programs cannot work around it. You can avoid this occurrence by putting attoClock or its alias into your Startup Items folder (within the System folder). Then attoClock will launch when your Macintosh starts up and nothing is on the Clipboard. Distribution and disclaimer attoClock and this documentation are Copyright © 1993 by Fred Condo, Ph.D. All rights reserved. attoClock may be distributed without payment to the author under the following conditions: ¥ This program is offered free for the benefit of the Macintosh user community. Therefore, no money may be charged for attoClock. This software may not be made part of any compilation for which a fee is charged without express written permission. The limitations in this paragraph do not apply to reasonable fees charged by non-profit Macintosh User Groups. ¥ attoClock may be distributed only unmodified and only if accompanied by this document. ¥ If you like and use attoClock, send me a fax or e-mail or call my BBS and tell me about your home town. In consideration of the fact that attoClock is a freebie, the author disclaims all responsibility for the programÕs failure. If it ever fails, let me know the circumstances of the failure by e-mail or fax, and I might fix it if I have the time. That we need disclaimers on free software proves that we live in a sick society. Version history 1.2.4 Changed resource and code to prevent the windowÕs brief appearance in its default location before moving to the user-specified location. Released generally. 1.2.3 Set the ÒGet Front ClicksÓ bit so that the window can be moved in a single action even when attoClock is in the background. Not publicized. 1.2.2 Changed from ReleaseResource to DisposHandle to dispose of the menu bar block returned by GetNewMBar. Not publicized as an update because the bugÕs only consequence seems to be the loss of a few bytes. 1.2.1 Moved call that brings the Finder to the front from EventLoop() to the handler of the open-application AppleEvent. Added (mostly for thoroughness) code to check for the presence of the Process Manager before using the Process Manager to bring the Finder to the front. Not publicized as an update because no version of the System Software has the features checked for in version 1.2 while lacking the Process Manager. 1.2 Completely redesigned memory management. AppleEvent-awareness added. Right-justification of time in window added. Brings Finder to the front rather than remaining the active application at launch time. 1.1.2 Enabled formatting unreadable diskettes. Not released. 1.1.1 Removed needless Edit menu. Not released. 1.1 Added date to about box. Not released. 1.0.1 Changed file permission from Write to Read in the preferences reading function. Also added time to about box and setting the cursor to the arrow on activate events. Not released. 1.0 Initial release. Acknowledgements ¥ Tim Dierks helped with information about the memory manager. ¥ Russell E. Owen suggested formatting the time right-justified. ¥ Sarah Pradt suggested bringing the Finder to the front. ¥ Bob Lougheed helped with testing.