Short: WB Titleclock, very configurable Author: henryk.richter@stud.uni-rostock.de Uploader: henryk richter stud uni-rostock de Type: util/time Architecture: m68k-amigaos TitleClock 1.12 (20-Nov-96) --------------------------- by Henryk "Buggs" Richter Purpose ------- TitleClock is just another little Workbench Title digital clock but this time with some special features. I know that there are 1000 other ones out doing the same job but mine can do a little bit more. It was written to be used in combination tools like with "MultiCX" by Martin Berndt to replace almost all really important functions of programs like "Kcommodity" but consuming much less memory. It works 100% conform to the style guide and does not patch any system function. So it should run on any machine equipped with OS2.x/3.x. A short list of features: ------------------------- - almost completely configurable output, e.g. "OutPutFormat=%W, Time: %h:%n:%s %D-%m-%Y ->DFT Rulez<-" causes it showing "Saturday, Time: 20:42:12 10-Dec-1994 ->DFT Rulez<-" - appears at the right side of the workbench title and doesn`t open a disturbing window - Workbench screen may be closed meanwhile Titleclock is active so you can change your prefs without having to close any window. - Supports a "MEM"-gauge with a variable size from 10 Pixels to 990 Pixels wide + selectable memory type to show - The program is a commodity so you can control it using Commodities Exchange. - Can be easily removed by starting it again or sending a "break" signal using a usual system monitor. - 100% font sensitive - detects automatically the colors used in titlebar - comes along with Icons for NewIcons AND MagicWB - re-entrant, 100% PC relative code - locale support using the standard strings so that this program works with every localized language (Kick 2.1+) - startable from either WB or Shell - option to calculate the Stardate (TNG Norm) - quite short !! Hey, C and E programmers! Try to do this by using your High-level languages, hehe Installation: ------------- Just drag the icon into the drawer you want. (usually sys:WBStartup) Starting: --------- Double click onto the Icon. (What else) Configuration: -------------- The program countains no gui. This saves lots of memory from being wasted. Therefore the configuration is done using the tooltypes. OutPutFormat=???? Here you enter the line for your output string template. You may use any printable character and some offered variables. Those may be combined in any way you like (double, triple or even four times, no problem). The special variables: %h -> hours in 24h military/European format %H -> hours in 12h American format %a -> "AM"/"PM" %n -> minutes %s -> seconds %D -> day %N -> month as number %m -> month as short string (Jan,Feb,Mar...) %M -> month as string %y -> year as 2 decimal numbers "94" %Y -> year as 4 decimal numbers "1994" %w -> weekday as short string (Mon,Tue,Wed...) %W -> weekday as string %% -> Just inserts a "%" char %S -> Startrek TNG Stardate Descriptions of the algorithms can be found in the TNG and TOS Startrek FAQ`s Short explanation how I did it: example output: "05085.6" -the first digit is the current century (2"0"th) -the second is the Startrek season in the series and the movies. I used the last digit of the current year here since it is stated in the FAQ that this one increases every year -the next 3 digits are the portion of the current year from 0...999, which means: number of the current day (0..365) *1000/365 -the ".6" represents the portion of the actual day divided through "2.4". If someone tells me how to convert gregorian date into the julian calendar, I`ll perhaps add an option for the TOS Stardate. %# -> inserts the number of the current week Examples: OutPutFormat=Time: %h:%n%:%s Date: %D-%M-%Y OutPutFormat=This day is %h hours, %n minutes and %s seconds old OutPutFormat=%W, %N-%D-%y %h:%n:%s Gauge=?? This tooltype is for the mem bar showing the amount of free memory. If the (normally blue) bar reaches the right side, your memory is full. :( You may change the width of this gauge by entering values from 1 to 99. A value of 1 represents a width of 10 pixels. Example: Gauge=5 Memtype=0x?? Here you can enter a c-style hexadecimal mask which type of mem is to be shown in the gauge. It works with standard exec-style Type definitions. (look into the examples, DUDE!) Examples: Memtype=0x4 ... shows only free Fastmem Memtype=0x2 ... shows only free Chipmem Memtype=0x0 ... shows complete free memory Memtype=0x1 ... shows Chip- and Fastmemory but not Virtual memory created e.g. by Gigamem® or VMM. Memtype=0x20000 . shows largest free memory block Memtype=0x20004 . shows largest free Fastmemory block . . . Known Bugs / Problems --------------------- Due to the display system blitting into the Workbench Titlebar Layer the display may disappear every time you change the current window or when the amount of free memory changes. I could change this behaviour but I didn`t want to open a window AND I hate too much patches. If you set the Program`s "toolpri" lower than 0 it may/will happen that some programs using 100% of the CPU time (like PC-Task) can cause a graphics deadlock. That happens when the blitter is already allocated by those functions used by Titleclock and then the CPU time is stolen by the Task with the higher priority. If you always use a priority of 5 (default setting) there shouldn`t be any problems. THE PROGRAM WILL NOT USE MORE CPU TIME IN THIS CASE ! History -------- 1.12 - added %# for the current week`s number 1.11 - internal version *not released* 1.10 - minor Bugfix, Titleclock reopened the Workbench screen automatically when it was closed by a program. Now it won`t do so. 1.08 - Bugfix, the OS2.0/2.1 versions of Titleclock tried to open the V39 commodities.library instead of V37 - ASM-Sourcecode included 1.07 - the program now be started from shell, the options are still read from the Icon in this case - small Bugfix, using the Kickstart 2.0/2.1 version it was possible that the memgauge wasn`t shown correct when using non standard screen widths 1.06 - the AM/PM showed 12 AM at high noon instead of 12 PM, fixed 1.05 - added the Stardate(TM) option 1.04 - fixed a minor bug, I just forgot to free the workbench screen`s drawinfo structure - added 12h / PM displaying modes since I were asked to *not released* 1.03 - wrote a version for Kickstart 2.0 (english only) - from Kick 2.1 onwards now localization supported - added some additional security checks - added the memtype option for the mem-gauge - little "bug" fixed causing some characters not to be deleted when using certain proportional fonts (added a space of 6 pixels) 1.02 - added a version with german strings, made the code re-entrant to save some bytes 1.01 - added the mem-gauge 1.00 - first non public testrelease Author ------ Henryk Richter (Buggs/Defect) Stephan Jantzen Ring 47 18106 Rostock Germany E-MAIL: tfa652@cks1.rz.uni-rostock.de (preferred) henryk.richter@stud.uni-rostock.de rh64@warnow.e-technik.uni-rostock.de Legal Stuff ----------- Titleclock IS Freeware, so use it the way you like. Copyright --------- Titleclock is written and copyright © 1994-96 by Henryk Richter. No parts of this program may be altered in any way (this includes editing, reprogramming, crunching, resourceing etc.), except archiving. The sourcecode is only included for learning purposes. Disclaimer ---------- THERE IS NO WARRANTY FOR THE PROGRAMS, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAMS "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAMS IS WITH YOU. SHOULD THE PROGRAMS PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY REDISTRIBUTE THE PROGRAMS AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAMS (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAMS TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Shorter: use it on your own risk... Distribution ------------ The Distributor may only charge a fee up to the costs of obtaining any common public domain disk. The distributor agrees to stop distributing the programs and data involved on request of the author. The distributor may only distribute an unmodified copy of the original program, with all the supplied documentation and copyright notices left intact. The amount of US $5 shouldn't be exceeded for a disk containing Titleclock.