
Starting a clock collection...
For anybody who is interested, I just noticed that Michael's original code specified the font "MS Trebuchet".
This is incorrect, and Windows substitutes another font, which doesn't look very good.
The correct font name is "Trebuchet MS". Using this font looks much better.
Thanks again, Michael, for a great piece of code!
Regards,
Eric
This is incorrect, and Windows substitutes another font, which doesn't look very good.
The correct font name is "Trebuchet MS". Using this font looks much better.
Thanks again, Michael, for a great piece of code!
Regards,
Eric
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
You guys are welcome to my numbers if you like them:
http://www.lloydsplace.com/numbers2.png
I use GrabImage to cut them in half. The slots on the sides are for a little turning wheel to fit in, like you see in some flip clocks. I like a little more mechanical complication, I think it adds to the look. (you'll have to make your own wheel).
http://www.lloydsplace.com/numbers2.png
I use GrabImage to cut them in half. The slots on the sides are for a little turning wheel to fit in, like you see in some flip clocks. I like a little more mechanical complication, I think it adds to the look. (you'll have to make your own wheel).
BERESHEIT
Looks like the 108min timer in the series "Lost"
Quick! type in the code!
Quick! type in the code!

Paul Dwyer
“In nature, it’s not the strongest nor the most intelligent who survives. It’s the most adaptable to change” - Charles Darwin
“If you can't explain it to a six-year old you really don't understand it yourself.” - Albert Einstein
“In nature, it’s not the strongest nor the most intelligent who survives. It’s the most adaptable to change” - Charles Darwin
“If you can't explain it to a six-year old you really don't understand it yourself.” - Albert Einstein
- Michael Vogel
- Addict
- Posts: 2807
- Joined: Thu Feb 09, 2006 11:27 pm
- Contact:
Hi,
just made some enhancements for the screensaver, some are maybe interesting:
• fonts are not that smooth, so I draw larger images and shrink it using the ImageResize function (just play around with smooth=0, 1 or 2 in the ini file)
• TextHeight() is still a problem, how to center "pure" vertically (lower case)
• I tried to add some rectangles on both sides to get a more realistic look, just play around with the configuration slider called "Klappen"
• you have a slow graphic card? Write "Quick=1" into the ini file
Michael
just made some enhancements for the screensaver, some are maybe interesting:
• fonts are not that smooth, so I draw larger images and shrink it using the ImageResize function (just play around with smooth=0, 1 or 2 in the ini file)
• TextHeight() is still a problem, how to center "pure" vertically (lower case)
• I tried to add some rectangles on both sides to get a more realistic look, just play around with the configuration slider called "Klappen"
• you have a slow graphic card? Write "Quick=1" into the ini file
Michael
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
A day or so before Michael posted this excellent code, my son asked me to get him up at 4 am for a trip to the city and he thought he'd likely sleep through his alarm. It just buzzes. So I downloaded the loudest ring I could find from a sounds forum I belong to and wrote him a little clock that would jangle him out of bed for sure. It took ten minutes and just had a text gadget for the time. When this thread appeared I thought, why not make a skin and a proper clock out of it? So I did. It doesn't have as good a transition effect as Michael's does but it's ok and probably as good as it's going to get. The only thing it doesn't do yet is ring when it's time, which is kind of funny because the only thing the first one did was ring and after 2 days work this one does everything except ring. Anyway, for anyone interested, here's what I have so far:
http://lloydsplace.com/alarmclock.zip
Please let me know of any problems or bugs.
http://lloydsplace.com/alarmclock.zip
Please let me know of any problems or bugs.
BERESHEIT
- Michael Vogel
- Addict
- Posts: 2807
- Joined: Thu Feb 09, 2006 11:27 pm
- Contact:
What a nice clocknetmaestro wrote:The only thing it doesn't do yet is ring when it's time [...]
Please let me know of any problems or bugs.


I started it immediately and there are just some (small) points...
• I got no alarm here, how have you implemented the alarm-check? (within an own thread, one check each second, check includes the seconds etc.)
• I could not stop the program using "Alt-F4" or "Esc"
• maybe "am" or "pm" should be seen also in the alarm time display
Michael
The alarm function should work using something like this...
Code: Select all
Enumeration
#AlarmOff
#AlarmOn
#AlarmActive
EndEnumeration
Global AlarmMode=#AlarmOn
Global ActualTime.s=FormatDate("%hh:%ii",Date())
Global OldTime.s
Global AlarmTime.s=FormatDate("%hh:%ii",Date()/60*60+60)
Repeat
Delay(200)
ActualTime.s=FormatDate("%hh:%ii",Date())
If ActualTime<>OldTime
OldTime=ActualTime
Debug ActualTime+" (Alarm at "+AlarmTime+")"
Select AlarmMode
Case #AlarmOn
If ActualTime=AlarmTime
Debug "* * * ALARM * * *"
Beep_(1000,1000)
AlarmMode=#AlarmActive
EndIf
Case #AlarmActive
Debug "Alarm stopped, next Alarm at "+AlarmTime
AlarmMode=#AlarmOn
EndSelect
EndIf
ForEver
- Michael Vogel
- Addict
- Posts: 2807
- Joined: Thu Feb 09, 2006 11:27 pm
- Contact:
I had some free time to finish this clock type for now, it grew over 2000 lines of code (slightly more than expected at the beginning
)
Here it is, feel free to play around with configs (you should click around in the dialog to find all configuration settings
)...
PureBasic Screen Saver Clock

Here it is, feel free to play around with configs (you should click around in the dialog to find all configuration settings

PureBasic Screen Saver Clock