03 August 2012, 13:04 | #1 |
Registered User
Join Date: Nov 2011
Location: Folkestone, Kent
Posts: 119
|
Alarm program in Hi Soft basic
I need code in Hi Soft basic for an alarm program,to warn me of time
sensitive actions. Anyone help? |
03 August 2012, 14:20 | #2 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
Like this:
Code:
timer on on timer(60) gosub checktime ... checktime: if left$(time$, 5) = "11:55" then print "put the kettle on" return |
03 August 2012, 22:33 | #3 |
Registered User
Join Date: Nov 2011
Location: Folkestone, Kent
Posts: 119
|
Thanks for the code. I need to enter the time on screen, so this is too simple!
|
04 August 2012, 14:46 | #4 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
Sorry I haven't got a complete alarm clock program for you, but you can f.ex do this to enter time in HH:MM format:
Code:
input "set alarm: ", t$ |
05 August 2012, 08:37 | #5 |
Registered User
Join Date: Nov 2011
Location: Folkestone, Kent
Posts: 119
|
Thanks for the help
|
05 August 2012, 09:18 | #6 |
Registered User
Join Date: Nov 2011
Location: Folkestone, Kent
Posts: 119
|
Thanks for the help. I have written the following:
input "set alarm ",t$ TIMER ON ON TIMER(1) GOSUB checktime checktime: IF LEFT$(TIME$,6) = t$ then sound 300,3,255,2 Is this OK? |
05 August 2012, 18:00 | #7 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
Your program continues as normal after you've started the timer, so unless there's anything else that needs to be done then you'd have to write it like this:
Code:
input "set alarm: ", t$ timer on on timer(1) gosub checktime do sleep loop checktime: if left$(time$, 5) = t$ then sound 300, 3, 255, 2 return |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Manuals for GFA Basic and Hi-Soft Basic 2 | ricky500 | request.Apps | 20 | 12 February 2013 21:06 |
Hi Soft Basic help wanted | alphagemini | Coders. General | 4 | 11 January 2013 11:39 |
Which 'free' Basic language program? | keitha1200 | Coders. Language | 29 | 04 October 2012 00:08 |
Hi Soft Basic help wanted | alphagemini | Coders. Scripting | 10 | 13 September 2012 12:43 |
|
|