TitleClock V3 by Anders Hammarquist This is FREEWARE, You may copy this program freely as long as you don't make a profit by doing so. A nominal copying charge is premissible. Fred Fish has explicit permission to include it in his collection, as do Pascal Rullier have explicit permission to include it in the BUGSS PD collection. TitleClock is a little commodity (about 4k) that throws up a clock in the top right corner of a screens titlebar. It may be set up to display itself on one or more screens, it may be set to follow you default public screen and also to always display on the frontmost screen. There have been quite a few changes since the first release. It will now display clocks on multiple screens, and also on non-public screens. This has resulted in new options, and some changes in the way that the program operates. Beware also that the stack requirement has increased (due to the use of dos.library's pattern matching functions). Since version 2, support for locale.library's FormatDate() has been added. Some of the code has been cleaned up, and, by popular demand, you get to see the code. Part of the problem with proportional fonts present in version 2 has also been fixed. You should no longer get remnants of the first character to the left of the string, but the text may still jerk back and forth as the text changes. Unfortunately, this problem is not easy to fix, as it would require remembering where on each screen the clock should be printed. As it is now, the clock does not even remember which screens it is displayed on from one second to the next. TitleClock accepts the following arguments, entered on the command line from the CLI and in the ToolType field of the icon if run from the Workbench. UPDATE= Number of seconds between clock updates. It's not recommended that you make this value 0. Although you can, it will load the CPU enormously, as TitleClock won't be waiting. Also, you probably don't want to make the value too large, as the clock gets erased every time Intuition changes the screen title. Though if you have a program that doesn't change the screen's title, it would be no problem to put up a TitleClock on it with UPDATE set to 60 seconds. Default is 1 second. Please note that it believes wierd values, if you set update to -1, it will update every 4 294 967 295 seconds SHOWDATE If present, TitleClock will show todays date in addition to the current time. SHOWDAY If present, TitleClock will show the day in addition to the current time. SHORTDAY If present, the day name will be truncated to the three first characters. SHOWSECS If present, TitleClock will display seconds as well as hours and minutes. FORMAT= Sets the format of the date display. It can be one of the following: DOS - displays as dd-mmm-yy International - displays as yy-mmm-dd American - displays as mm-dd-yy Canadian - displays as dd-mm-yy Default is DOS. DATEFORMAT= Specify a format string for the date/time to be displayed in the screen title. This option requires that you have locale.library installed (available with Workbench version 2.1 and later). If you do not, this option will simply be ignored. Beware that this option overrides any other formatting options you have specified if you do have locale.library. You can specify any text you want in the string, and insert the current time and day in your default language by using the following % sequences: %a - abbreviated weekday name %A - weekday name %b - abbreviated month name %B - month name %c - same as "%a %b %d %H:%M:%S %Y" %C - same as "%a %b %e %T %Z %Y" %d - day number with leading 0s %D - same as "%m/%d/%y" %e - day number with leading spaces %h - abbreviated month name %H - hour using 24-hour style with leading 0s %I - hour using 12-hour style with leading 0s %j - julian date %m - month number with leading 0s %M - the number of minutes with leading 0s %p - AM or PM strings %q - hour using 24-hour style %Q - hour using 12-hour style %r - same as "%I:%M:%S %p" %R - same as "%H:%M" %S - number of seconds with leadings 0s %T - same as "%H:%M:%S" %U - week number, taking Sunday as first day of week %w - weekday number %W - week number, taking Monday as first day of week %x - same as "%m/%d/%y" %X - same as "%H:%M:%S" %y - year using two digits with leading 0s %Y - year using four digits with leading 0s In future versions of the operating system, Commodore may add more formatting strings. In particular, %Z may one day be implemented. As it is now, %Z does not exists, but %C tries to use it, which has rather interesting effects, making the %C formatting string rather useless until that time. If you wish to include a single %-sign in the display, enter %% into the format string. A few examples: DATEFORMAT=Current time: %T Yields something like: Current time: 15:06:12 DATEFORMAT=%Hh%M, of %e %B Yields something like: 15h06, of 4 January PUBSCREEN= Tells TitleClock which public screen to appear on. This may be a standard AmigaDOS pattern, in which case the clock will appear on all public screens whose name matches this pattern. The match is case sensitive. Please note that specifying a pattern if you have a lot of public screens will affect system performance. SCREENPAT= This tells TitleClock which NON-public screens to appear on. It is a standard AmigaDOS pattern, compared to the default title of all system screens. The match is case sensitive. Note that the default title of a screen may not be the same as that which is displayed. For example, the default title for the Workbench screen is 'Workbench Screen'. Also note that specifying this option when you have a lot of screens will affect system performance. FRONTSCREEN If this option is specified, TitleClock will display a clock on the frontmost screen. DEFSCREEN If this option is specified, TitleClock will display a clock on the default public screen. CX_PRIORITY= Sets the priority of TitleClock's commodity broker. Default is 0. TOOLPRI= Sets the priority of TitleClock's task. Default is 0. If you do not specify any of the PUBSCREEN, SCREENPAT, FRONTSCREEN, or DEFSCREEN options you will not get a clock. Also, the clock will not be displayed on any screen whose title is hidden, such as on a lot of terminal programs. Beware that Commodore's screenblanker included with 3.0 does NOT hide the title, so you will get a clock on it if you specify FRONTSCREEN (you can't match it's title, since it's NULL. This was discovered the hard way, via Enforcer). If you put TitleClock in your WBStartup drawer, Workbench likes to see a DONOTWAIT ToolType. That should be it. Thanks go to: Gaël Marziou - for good ideas, and help with locale.library. Pascal Rullier - for the French manual translation. All the users who wrote me - for good ideas, and makeing me feel happy having done something useful. Sorry if your idea hasn't been implemented yet. Everyone who makes the Amiga what it is. Questions, comments, bug reports, et.c. to: Internet: f92anha@dd.chalmers.se -or- Anders_Hammarquist@p16.f123.n203.z2.fidonet.cd.chalmers.se FidoNet: Anders Hammarquist of 2:203/123.16 Spare harddrives, memory, those Ethernet cards you aren't using, anything else you feel like donating (and any paper mail) to: Anders Hammarquist Schottisvägen 17 S-424 38 Angered Sweden