Page 3 of 3
Posted: Wed Apr 08, 2009 9:19 am
by dige
Cool

Posted: Mon Apr 27, 2009 3:47 pm
by ebs
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
Posted: Tue Apr 28, 2009 11:53 pm
by netmaestro
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).
Posted: Wed Apr 29, 2009 7:06 am
by pdwyer
Looks like the 108min timer in the series "Lost"
Quick! type in the code!

Posted: Wed May 06, 2009 4:38 pm
by Michael Vogel
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
Posted: Thu May 07, 2009 5:09 am
by netmaestro
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.
Posted: Thu May 07, 2009 8:33 am
by Michael Vogel
netmaestro wrote:The only thing it doesn't do yet is ring when it's time [...]
Please let me know of any problems or bugs.
What a nice clock

, well done! (I like the glass effect

)
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
Posted: Fri May 29, 2009 6:24 am
by Michael Vogel
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