# budilnik menu_off = 1 if $ARGS[0] = 'start': *clr & cla gs 'stat' '
> src="images/shared/home/bedroom/bed2.jpg">
' *nl *nl if numbud = 4:'
<><>:<><>
' if numbud = 3:'
<><>:<><>
' if numbud = 2:'
<><>:<><>
' if numbud = 1:'
<><>:<><>
' if numbud = 0:'
<><> : <><>
' *nl '
1 2 3
' '
4 5 6
' '
7 8 9
' '
0
' '
Reset (week) Set this time for the week
' '
Reset (weekend) Set this time for the weekend
' *nl if budilnikOn = 0: '
Your alarm is currently turned off
' else '
Your alarm is currently turned on
' '
The alarm is set to '+iif(timer < 10,'0<>','<>')+':'+iif(timerM < 10,'0<>','<>')+' during the week and to '+iif(timerEnd < 10,'0<>','<>')+':'+iif(timerEndM < 10,'0<>','<>')+' during the weekend.
' end act 'Finish': cla bud1 = 0 bud2 = 0 bud3 = 0 bud4 = 0 numbud = 0 gt 'budilnik', 'fin' end end if $ARGS[0] = 'Time': cla budilnikOn = 1 if bud_weekend = 1: timerEnd = bud1 * 10 + bud2 timerEndM = bud3 * 10 + bud4 if timerEnd > 23:timerEnd = 0 if timerEndM > 60:timerEndM = 0 else timer = bud1 * 10 + bud2 timerM = bud3 * 10 + bud4 if timer > 23:timer = 0 if timerM > 60:timerM = 0 end gt 'budilnik', 'start' end if $ARGS[0] = '1': cla !!if numbud = 4:end if numbud = 3:bud4 = 1 & numbud = 4 if numbud = 2:bud3 = 1 & numbud = 3 if numbud = 1:bud2 = 1 & numbud = 2 if numbud = 0:bud1 = 1 & numbud = 1 gt 'budilnik', 'start' end if $ARGS[0] = '2': cla !!if numbud = 4:end if numbud = 3:bud4 = 2 & numbud = 4 if numbud = 2:bud3 = 2 & numbud = 3 if numbud = 1:bud2 = 2 & numbud = 2 if numbud = 0:bud1 = 2 & numbud = 1 gt 'budilnik', 'start' end if $ARGS[0] = '3': cla !!if numbud = 4:end if numbud = 3:bud4 = 3 & numbud = 4 if numbud = 2:bud3 = 3 & numbud = 3 if numbud = 1:bud2 = 3 & numbud = 2 if numbud = 0:bud1 = 3 & numbud = 1 gt 'budilnik', 'start' end if $ARGS[0] = '4': cla !!if numbud = 4:end if numbud = 3:bud4 = 4 & numbud = 4 if numbud = 2:bud3 = 4 & numbud = 3 if numbud = 1:bud2 = 4 & numbud = 2 if numbud = 0:bud1 = 4 & numbud = 1 gt 'budilnik', 'start' end if $ARGS[0] = '5': cla !!if numbud = 4:end if numbud = 3:bud4 = 5 & numbud = 4 if numbud = 2:bud3 = 5 & numbud = 3 if numbud = 1:bud2 = 5 & numbud = 2 if numbud = 0:bud1 = 5 & numbud = 1 gt 'budilnik', 'start' end if $ARGS[0] = '6': cla !!if numbud = 4:end if numbud = 3:bud4 = 6 & numbud = 4 if numbud = 2:bud3 = 6 & numbud = 3 if numbud = 1:bud2 = 6 & numbud = 2 if numbud = 0:bud1 = 6 & numbud = 1 gt 'budilnik', 'start' end if $ARGS[0] = '7': cla !!if numbud = 4:end if numbud = 3:bud4 = 7 & numbud = 4 if numbud = 2:bud3 = 7 & numbud = 3 if numbud = 1:bud2 = 7 & numbud = 2 if numbud = 0:bud1 = 7 & numbud = 1 gt 'budilnik', 'start' end if $ARGS[0] = '8': cla !!if numbud = 4:end if numbud = 3:bud4 = 8 & numbud = 4 if numbud = 2:bud3 = 8 & numbud = 3 if numbud = 1:bud2 = 8 & numbud = 2 if numbud = 0:bud1 = 8 & numbud = 1 gt 'budilnik', 'start' end if $ARGS[0] = '9': cla !!if numbud = 4:end if numbud = 3:bud4 = 9 & numbud = 4 if numbud = 2:bud3 = 9 & numbud = 3 if numbud = 1:bud2 = 9 & numbud = 2 if numbud = 0:bud1 = 9 & numbud = 1 gt 'budilnik', 'start' end if $ARGS[0] = '0': cla !!if numbud = 4:end if numbud = 3:bud4 = 0 & numbud = 4 if numbud = 2:bud3 = 0 & numbud = 3 if numbud = 1:bud2 = 0 & numbud = 2 if numbud = 0:bud1 = 0 & numbud = 1 gt 'budilnik', 'start' end if $ARGS[0] = 'Reset': cla if bud_weekend = 1: timerEnd = 0 timerEndM = 0 else timer = 0 timerM = 0 end bud1 = 0 bud2 = 0 bud3 = 0 bud4 = 0 numbud = 0 gt 'budilnik', 'start' end if $ARGS[0] = 'fin': gt $loc, $metka --- budilnik ---------------------------------