Hi everyone,

Good news! :)

First, thanks for all the concern, advice, and willingness to help. Second, I think, Bruce, your cuckoo clock is a monument to beauty and app competence. Cheers to you. Third, Chip, I remembered a comment you made in your class on event handlers, about the fact that you have to queue speech and disk access or else you'll run into problems. Well, my clock sub had this problem, and this is why it was failing to reset. Being fairly new to writing apps, it's pretty clear that I have a lot to learn. Hey, I was even thinking, as you see on many e-lists, perhaps we should be given a ranking when we post to this list. Smile. Well, I'm just teasing a bit, but it is an idea, although I guess people get to know who the MVP's are, eh? Smile.

I tend to be a bit more hands on then perhaps is good for me, such that I don't take the time to read good code like yours, Bruce and Chip, but I've had my chastisement, and I promise I'll do more research before being so ambitious in the future. Being that as it may, I can't help but enclose my simple little app for announcing the time, fixed so that it doesn't hang, and please feel free to comment.

Thanks for everything, good friends,

Rod :)
Here's my code for announcing the time every 15 minutes using the default synthesizer:
Option Explicit
Dim MyHour, MyMin, MySec
Dim Interval : Interval = 15
StartTimer 1000, "MyTimer"

Sub MyTimer()
MyHour = Hour(Now)
MyMin = Minute(Now)
MySec = Second(Now)
If MySec = 0 Then
If MyMin / Interval = Int(MyMin / Interval) Then 'on the announcement interval
Queue "SpeakTime"
End If 'on the announcement interval
End If 'MySec = 0
StartTimer 1000, "MyTimer"
End Sub 'MyTimer

Sub SpeakTime()
If MyHour = 0 Then MyHour = 12
If MyHour > 12 Then MyHour = MyHour - 12
If MyMin = 0 Then MyMin = "o'clock"
Speak MyHour & " " & MyMin
End Sub 'SpeakTime()

Reply via email to