Basically I'm trying to create a program that will read the time, and at a certain point change the desktop background and trigger an alarm sound (one of the built in ones, bellring)
I couldn't get it working so I thought that Id focus on getting the alarm triggering first (without the desktop change) and then come back to that.
here's the code :
subSetAlarm() up: If Clock.Time = alarm Then Sound.PlayBellRing() EndIf Program.Delay(1000) Goto up Sub subSetAlarm TextWindow.WriteLine("Set Alarm") TextWindow.Write("Enter Hour: ") hour = TextWindow.ReadNumber() TextWindow.Write("Enter Minute: ") minute = TextWindow.ReadNumber() alarm = hour + ":" + minute + ":00 " TextWindow.WriteLine("Alarm Time: " + alarm) EndSub
when this is entered I get the following window :
So I enter the time information, but when the time comes round (6:23 PM) nothing happens. I tried entering 24 hour time and getting rid of the AM PM arguments, but that didn't work either.
As far as I understand the Program.Delay should be refreshing the program within the "up:" label every second. I also tried displaying the current time with the up loop, but it didn't keep refreshing, is this the problem?
Maybe there's something obvious, I'm not too sure though.
Thank you for any help.