Short: Italian clock+alarm+source code (bugfix) Author: stefano.regattin@tin.it (Stefano Regattin) Uploader: stefano.regattin@tin.it (Stefano Regattin) Type: dev/basic Distribution: OK Date: Thursday 7th June 2001 Name of the program: Orologio (clock) This is an italian evolution of the example program "Clock.bb" supplied with Blitz2. There is a bug in the Blitz2 language that gives erroneous date after the end of the year 2000; this upload is my solution for this bug! The bug is in the date functions Days, Months and Years; WeekDay works fine! You can change the clock font by activating the window and clicking the LEFT MOUSE BUTTON; in this case you will see a new window containing some string gadgets: the top-left gadget must be used to type the alarm's hour and mins; the next gadget at the right must be used to activate or to deactivate the alarm; the below gadget must be used to select the font: type the name of the font (with or without the ".font" suffix) that you know it resides in your FONTS: drawer; pressing RIGHTAMIGA-X keys you will clean the gadget; pressing subsequently the ENTER key you be able to see all fonts that resides in your FONTS: drawer and you can select one of these. In this case the last gadget at top-right will show the height of the font you have selected and always you can modify it. The following two gadgets are for type into the coordinates of the top-left corner of the clock window. The four arrows box named "Angolo fisso" is for select the fixed angle: this angle (normally the top-left angle) will be ever locked on screen, giving the other three to change their position depending on the settings; the coordinates you type and save are related to this one; remember this when you change the coordinates and/or the angle by tooltypes (see below). The following two gadgets are to type into the coordinates of the bottom-right corner of the clock window; the possible combinations of the four gadgets for the top-left and for the bottom-right coordinates are shown as four arrows in the gadget previously described and are: TOP-LEFT (standard), TOP-RIGHT, BOTTOM-RIGHT and BOTTOM-LEFT. The "Colori" gadget opens a new window to select the text colour and background colour for the clock: point with the mouse pointer on a colour, and click the LEFT MOUSE BUTTON to choose it as text colour, or click the RIGHT MOUSE BUTTON to choose it as background colour. Note that you cannot select the same colour as text colour and background colour. The "*** Salva ***" gadget permits to save any change. You can specify the font name, the font size, the coordinates of the position of the main window, the related angle, the text colour and the background colour by tooltypes; when the program is launched if there are the tooltypes the informations are taken from these, otherwise the parameters are set to default. For who don't know, tooltypes are those parameters shown in the icon information window that is shown if you select the voice INFORMATION of the ICON menu. If there is no tooltype DONOTWAIT, when you save the changes it will be added. If you have activated the alarm, in the clock window will be shown a bubble; you can deactivated it pointing with the pointer on the bubble and clicking with the LEFT MOUSE BUTTON. The default font is "Data70.font", a font made by me supplied with the program. I think that this font is better than the font "2001.font" supplied with AMOS Pro. My font is suited for italian language, for which the character "è" capital is obtainable with the "§" character; however it have all the chars from (ASCII) 32 to 255 now! Use it for games in low resolution, it is better! How to install the "Data70" font: copy in your drawer "FONTS:" the file named "Data70.font". Create in your drawer "FONTS:" the drawer "Data70" and copy into it the file "13". If you have Blitz2 There is the source code (Orologio.bb2) for free modifications; if you don't have it, you can however analyze the source code by a text viewer like MultiView reading the file named "Orologio.text"; if you load the source code in Blitz2 and you see some "?????" instead of keywords, you cannot compile the program because your "deflibs" file do not have all the keywords needed: you can find a sufficiently updated deflibs file in the package "Blitz Support Suite", that was sold alone on three diskettes ("BSS1", "BSS2" and "BSS3"), that now are part of the "Ultimate Blitz Basic" CD, that is sold in the UK by Epic Marketing (http://www.epiconline.co.uk). If you want to install by yourself the keywords needed, you must have all the libs in BlitzLibs: and the command for AmigaDOS "MakeDefLibs" from Blitz Support Suite; after this you can run from shell the command MakeDefLibs with no parameters, that it will build up a new deflibs file from your libs in DefLibs:, backing up the previously one. The executable icon is a ColorIcon (OS3.5) taken from the archive ReallyIcons.lha by Angel Schnider. Notes: I have removed a previous version bug of gadget garbages in the settings window that it occurred after the font was changed and then the settings window was recalled; now there are problems no more. I have corrected a defect of a previous version that it happens if you have deactivated the alarm clicking on the bubble: the alarm gadget in the settings window did not deselect automatically; now the problem is solved. Now The clock use your workbench presetted sound not only for the alarm, but also to count the hours when these change. I have corrected the program to allow correct window positioning on startup when the screen height override the 512 pixel limit of the standard workbench; this it has been tested on a 800x600 True Colours WinUAE screen. I have in mind to give a bigger colours palette choose for the owners of Amigas (emulated or true) that have a graphics card but, at the moment, I don't know how to do it. I am not responsible of any damage this program can occurs to your system; you use it at your own risk! At end see my home page to the Internet address: http://utenti.tripod.it/esseerre/Stefano.html The following is the same text in italian. Data: domenica, 20 maggio 2001 Nome del programma: Orologio Questa è un'evoluzione italiana del programma d'esempio "Clock.bb" fornito con Blitz2. C'è un baco nel linguggio Blitz2 che dà una data errata dopo la fine dell'anno 2000; questo caricamento è la mia soluzione per questo baco! Il baco è nelle funzioni per la data Days, Months and Years; WeekDay và bene! Potete cambiare il font dell'orologio attivando la finestra e cliccando con il TASTO SINISTRO DEL MOUSE; in questo caso vedrete una nuova finestra contenente alcuni campi per l'immissione di testo: il campo in alto a sinistra deve essere usato per digitare l'ora ed i minuti dell'allarme; il campo successivo a destra deve essere usato per attivare o disattivare l'allarme; il campo seguente in basso deve essere usato per selezionare il font; digitate il nome del font (con o senza il suffisso ".font") che sapete che si trova nel vostro cassetto FONTS:; premendo i tasti AMIGA-destro e X pulirete il campo; premendo successivamente il tasto ENTER sarete in grado di vedere tutti i font che si trovano nel vostro cassetto FONTS: e potrete selezionarne uno; in questo caso il campo in alto a destra mosterà l'altezza del font selezionato che potrete sempre modificare. I seguenti due campi in basso servono per impostare le coordinate dell'angolo in alto a sinistra della finestra dell'orologio. Il quadrato con dentro quattro freccie serve per la selezione dell'angolo fisso: questo angolo (solitamente l'angolo in alto a sinistra) rimarrà fisso sullo schermo, lasciando liberi gli altri tre di cambiare la loro posizione a seconda dei parametri; le coordinate che digitate e che salvate sono relative a questo angolo; ricordavetelo quando cambiate le coordinate e/o l'angolo dai tooltype (vedi di seguito). I seguenti due campi in basso servono per impostare le coordinate dell'angolo in basso a destra della finestra dell'orologio; le combinazioni possibili dei campi per le coordinate dell'angolo in alto a sinistra e per quello in basso a destra sono mostrate come freccie nel quadrato prcedentemente descritto e sono rispettivamente: l'angolo in alto a sinistra (TOP-LEFT), che è la condizione normale, l'angolo in alto a destra (TOP-RIGHT), l'angolo in basso a destra (BOTTOM-RIGHT) e l'angolo in basso a sinistra (BOTTOM-LEFT). Il bottone "Colori" apre una nuova finestra per la selezione dei colori del testo e dello sfondo: puntate con il puntatore del mouse su un colore, e cliccate il TASTO SINISTRO DEL MOUSE per sceglierlo come colore del testo, o cliccate con il TASTO DESTRO DEL MOUSE per sceglierlo come colore di sfondo; notate che non potete selezionare lo stesso colore per il testo e per lo sfondo. Il bottone "*** Salva ***" permette di salvare ogni cambiamento. Potete specificare il nome del font, l'altezza del font, le coordinate della posizione della finestra principale, l'angolo relativo, il colore del testo ed il colore dello sfondo con i tooltype; quando lanciate il programma se ci sono i tooltype le informazioni vengono prese da questi, altrimenti i parametri sono impostati ai valori di default. Per chi non lo sapesse, i tooltype sono quei parametri mostrati nella finestra delle informazioni dell'icona che esce se selezionate la voce INFORMAZIONI dal menù ICONE. Se non c'è il tooltype DONOTWAIT, verrà aggiunto quando salverete i cambiamenti. Se avete attivato l'allarme, nella finestra dell'orologio comparirà una bolla; potete disattivarlo in qualsiasi momento portando il puntatore del mouse sulla stessa e cliccando con il TASTO SINISTRO DEL MOUSE. Il font di default è "Data70.font", un font fatto da me fornito col programma. Io credo che questo font sia migliore del font "2001.font" fornito con AMOS Pro. Il mio font è adattato per la lingua italiana, per la quale il carattere "è" maiscolo è ottenibile con il carattere "§"; comunque ha tutti i caratteri dal (ASCII) 32 al 255; usatelo in giochi a bassa risoluzione, rende meglio! Come installare il font "Data70": copiate nel vostro cassetto "FONTS:" il file "Data70.font". Create nel vostro cassetto "FONTS:" il cassetto "Data70" e copiatevi il file "13". Se avete Blitz2 c'è il codice sorgente (Orlogio.bb2) per libere modifiche; se non lo avete, potete lo stesso analizzare il codice sorgente leggendo con un visualizzatore di testi come MultiView il file "Orologio.text"; se voi caricate il codice sorgente in Blitz2 e vedete dei "?????" al posto dei comandi, non potete compilare il programma perché il vostro file "deflibs" non ha tutti i comandi richiesti; potrete trovare un file deflibs aggiornato nel pacchetto "Blitz Support Suite", che era venduto a parte su tre dischetti ("BSS1", "BSS2" e "BSS3"), che ora sono parte del CD "Ultimate Blitz Basic", venduto in Italia da NonSoLoSoft (http://www.diff.org/nonsolosoft); se volete installare da soli i comandi necessari, dovete avere tutte le librerie in BlitzLibs ed il comando per AmigaDOS "MakeDefLibs" dal pacchetto Blitz Support Suite; dopo di ciò potete eseguire il comando MakeDefLibs senza parametri da shell, che creerà un nuovo file deflibs usando le vostre librerie in DefLibs:, conservando il file deflibs precedente. L'icona dell'eseguiblie e un'icona ColorIcon (OS3.5) presa dall'archivio ReallyIcons.lha di Angel Schnider. Note: ho rimosso il problema di una precedente versione che creava dei campi sbagliati nella finestra dei parametri, il che avveniva dopo che il font veniva cambiato e veniva richiamata la finestra stessa; ora non ci sono più problemi. Ho corretto il difetto di una precedente versione che si verificava se si disattivava l'allarme cliccando sulla bolla: il bottone per la selezione dell'allarme nella finestra delle impostazioni non si deselezionava automatcamente; ora il problema è risolto. Ora l'orologio usa il suono preimpostato del workbench non solo per l'allarme, ma anche per contare le ore quando cambiano. Ho corretto il programma per avere un posizionamento corretto della finestra all'avvio l'altezza dello schermo supera il limite del workbench standard dei 512 pixel; ciò è stato testato su uno schermo 800x600 True Colours di WinUAE. Ho in mente di dare una scelta di colori della tavolozza piu ampia per i possessori di Amiga (emulati o no) che hanno una shceda grafica ma, al momento, non so come fare. Non sono responsabile dei danni che questo programma può arrecare al vostro sistema, lo usate a vostro esclusivo rischio! Per finire guardate la mia pagina su Internet all'indirizzo: http://utenti.tripod.it/esseerre/Stefano.html Ciao!