# alarmclock if $ARGS[0] = 'start': menu_off = 1 gs 'stat' '
> src="images/shared/home/bedroom/bed2.jpg">
' '

Enter the time using the number pad and click on set to change alarm times, don''t forget to turn your alarm on.

' *nl gs 'alarmclock', 'build_table' act 'Finish': bud1 = 0 bud2 = 0 bud3 = 0 bud4 = 0 numbud = 0 gt 'alarmclock', 'fin' end act 'Clear time display': bud1 = 0 bud2 = 0 bud3 = 0 bud4 = 0 numbud = 0 gt 'alarmclock', 'start' end end if $ARGS[0] = 'alarm_display': !! func('alarmclock', 'alarm_display', hour, minutes) $result = '<>' end if $ARGS[0] = 'get_week_display': $result = '<>' end if $ARGS[0] = 'get_weekend_display': $result = '<>' end if $ARGS[0] = 'base_alarmclock_text': $result = 'Your alarm clock is set to <> during the week and <> during the weekend. It is currently turned ' + iif(alarmVars['alarmOn'] = 0, 'OFF.', 'ON.') end if $ARGS[0] = 'clear': cla bud1 = 0 bud2 = 0 bud3 = 0 bud4 = 0 numbud = 0 gt 'alarmclock', 'start' end if $ARGS[0] = 'Time': alarmVars['alarmOn'] = 1 if bud_weekend = 1: alarmVars['timerEndH'] = bud1 * 10 + bud2 alarmVars['timerEndM'] = bud3 * 10 + bud4 if alarmVars['timerEndH'] > 23: alarmVars['timerEndH'] = 0 if alarmVars['timerEndM'] > 60: alarmVars['timerEndM'] = 0 else alarmVars['timerH'] = bud1 * 10 + bud2 alarmVars['timerM'] = bud3 * 10 + bud4 if alarmVars['timerH'] > 23: alarmVars['timerH'] = 0 if alarmVars['timerM'] > 60: alarmVars['timerM'] = 0 end gt 'alarmclock', 'start' end if $ARGS[0] = '1': !!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 'alarmclock', 'start' end if $ARGS[0] = '2': !!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 'alarmclock', 'start' end if $ARGS[0] = '3': !!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 'alarmclock', 'start' end if $ARGS[0] = '4': !!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 'alarmclock', 'start' end if $ARGS[0] = '5': !!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 'alarmclock', 'start' end if $ARGS[0] = '6': !!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 'alarmclock', 'start' end if $ARGS[0] = '7': !!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 'alarmclock', 'start' end if $ARGS[0] = '8': !!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 'alarmclock', 'start' end if $ARGS[0] = '9': !!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 'alarmclock', 'start' end if $ARGS[0] = '0': !!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 'alarmclock', 'start' end if $ARGS[0] = 'Reset': if bud_weekend = 1: alarmVars['timerEndH'] = 0 alarmVars['timerEndM'] = 0 else alarmVars['timerH'] = 0 alarmVars['timerM'] = 0 end bud1 = 0 bud2 = 0 bud3 = 0 bud4 = 0 numbud = 0 gt 'alarmclock', 'start' end if $ARGS[0] = 'fin':gt $menu_loc, $menu_arg if $ARGS[0] = 'build_table': $num_html = '' $html_num = '' $more_html = '
' if numbud = 4:$alarm_html = '<><> : <><>' if numbud = 3:$alarm_html = '<><> : <><>' if numbud = 2:$alarm_html = '<><> : <><>' if numbud = 1:$alarm_html = '<><> : <><>' if numbud = 0:$alarm_html = '<><> : <><>' $numbud_table='' $numbud_table+='<<$num_html>>1<<$html_num>>' $numbud_table+='<<$num_html>>2<<$html_num>>' $numbud_table+='<<$num_html>>3<<$html_num>>' $numbud_table+='<<$num_html>>4<<$html_num>>' $numbud_table+='<<$num_html>>5<<$html_num>>' $numbud_table+='<<$num_html>>6<<$html_num>>' $numbud_table+='<<$num_html>>7<<$html_num>>' $numbud_table+='<<$num_html>>8<<$html_num>>' $numbud_table+='<<$num_html>>9<<$html_num>>' $numbud_table+='
' $even_more_html = '
Clear
0
' $alarmVars_table='
' $alarmVars_table+='' $alarmVars_table+='' $alarmVars_table+='' $alarmVars_table+='' $alarmVars_table+='' $alarmVars_table+='' if mid($start_type,1,2) = 'sg': $alarmVars_table+='' end $alarmVars_table+='' if alarmVars['alarmOn'] = 1: $alarmVars_table+='
Reset weekday alarmSet weekday alarmCurrently set for <>
Reset weekend alarmSet weekend alarmCurrently set for <>
Use weekend alarm for holidays - ' + iif(alarmVars['alarm_holiday'] = 0, 'OFF', 'ON') + '
Your alarm is currently turned ' + iif(alarmVars['alarmOn'] = 0, 'OFF', 'ON') + '.
' end $alarmVars_table+='
Your Alarm is ' + iif(alarmVars['timerH'] <= 0 and alarmVars['timerM'] <= 0, 'not set', 'set to ' + func('time', 'get_time_string', alarmVars['timerH'], alarmVars['timerM'])) + ' for the weekdays ' + iif(alarmVars['timerEndH'] <= 0 and alarmVars['timerEndM'] <= 0, 'and not set', 'and set to ' + func('time', 'get_time_string', alarmVars['timerEndH'], alarmVars['timerEndM'])) + ' for the weekend' + iif(alarmVars['alarm_holiday'] = 1, ' and holidays', '') + '.
' '<<$more_html>><<$alarm_html>><<$even_more_html>><<$numbud_table>>' '<<$alarmVars_table>>' killvar '$num_html' killvar '$html_num' killvar '$alarm_html' killvar '$numbud_table' killvar '$more_html' killvar '$even_more_html' killvar '$alarmVars_table' end --- alarmclock ---------------------------------