this is the script
what would i have to change to make it not play the chimes from 11pm to 5 am?
Sub Main
Dim h,d,chime,hour_chime
chime = hs.GetAppPath + "\westminster_chime.wav" 'if you have a better sounding wav put it here
hour_chime = hs.GetAppPath + "\hour_chime.wav"
d= Time
h = Hour(d)
s = second(d)
m = minute(d)
If h > "12" Then ' strip away military time format
h = h - 12
End If
hs.setvolume 20,20 ' for WAF reduces volume before playing chimes. Adjust to your liking.
hs.waitsecs 3 ' needed to keep volume change from happening too late.
hs.speak chime,True ' play westminster chime wav
For i = 1 To h ' play hourly chime each time for each hour
hs.speak hour_chime,True
Next
hs.waitsecs 5 ' needed to keep volume change from happening too soon.
hs.setvolume 20,20 'change volume back so that we can hear voice announcements, etc...
End Sub
what would i have to change to make it not play the chimes from 11pm to 5 am?
Sub Main
Dim h,d,chime,hour_chime
chime = hs.GetAppPath + "\westminster_chime.wav" 'if you have a better sounding wav put it here
hour_chime = hs.GetAppPath + "\hour_chime.wav"
d= Time
h = Hour(d)
s = second(d)
m = minute(d)
If h > "12" Then ' strip away military time format
h = h - 12
End If
hs.setvolume 20,20 ' for WAF reduces volume before playing chimes. Adjust to your liking.
hs.waitsecs 3 ' needed to keep volume change from happening too late.
hs.speak chime,True ' play westminster chime wav
For i = 1 To h ' play hourly chime each time for each hour
hs.speak hour_chime,True
Next
hs.waitsecs 5 ' needed to keep volume change from happening too soon.
hs.setvolume 20,20 'change volume back so that we can hear voice announcements, etc...
End Sub
Comment