dialog wake_dialog {
size -1 -1 292 222
title "שעון מעורר"
text ,1,12 13 100 21
text Today: $date,2,12 35 100 20
text " Alarm Clock",3,210 6 70 19
text " By",4,224 21 50 17
text "GodBless",5,228 39 50 17
button "בטל",6,7 180 60 30, cancel
button "שעה",7,7 140 60 30
button "תאריך",8,73 140 60 30
button "אישור",9,74 180 60 30, ok
button "הפעל",15,220 160 60 30
button "בחר שיר",22,150 160 60 30
button "מצב",19,180 80 60 30
link "www.mircx.co.il",10,205 55 83 17
check "שיר\צליל",11,8 53 70 19
check "הודעה",12,8 73 70 20
check "נוטיס",13,8 93 70 20
list 14,-7 114 303 14, size
}
on *:dialog:wake_dialog:init:*:{
if (%click11) { did -c wake_dialog 11 }
if (%click12) { did -c wake_dialog 12 }
if (%click13) { did -c wake_dialog 13 }
.timerdialogd 0 1 did -o wake_dialog 1 1 The Time: $($time,0)
}
on *:dialog:wake_dialog:sclick:11:{
if (%click11) && (%WakeON! != ON) { unset %click11 | set %Askmusic 0 | set %check off | setmsg }
else { set %click11 1 | set %check on | set %Askmusic 1 | setmsg }
}
on *:dialog:wake_dialog:sclick:12:{
if (%click12) && (%WakeON! != ON) { unset %click12 | set %Askmsg 0 | setmsg | set %wakemsg Not defined yet }
else { set %click12 1 | set %Askmsg 1 | set %wakemsg $$?"Set msg here" | setmsg }
}
on *:dialog:wake_dialog:sclick:13:{
if (%click13) && (%WakeON! != ON) { unset %click13 | set %AskNotice 0 | setmsg }
else { set %click13 1 | set %AskNotice 1 | setmsg }
}
on *:dialog:wake_dialog:sclick:19:{
if (%WakeON! == ON) { echo -a %colorao1 1The alarm clock is 3ON1 for date: %datewake Time: %timewake $+ . 1Status: Notice: %notice? $+ , MSG %MSG? $+ , Music: %Music? $+ . %colorao2 }
if (%WakeON! == OFF) { echo -a %colorao1 1The alarm clock is 4OFF %colorao2 }
}
on *:dialog:wake_dialog:sclick:22:{
echo -a %colorao1 -------------------------------------- %colorao2
echo -a %colorao1 -------------------------------------- %colorao2
echo -a %colorao1 Select your Song that you wanna hear!!. %colorao2
echo -a %colorao1 -------------------------------------- %colorao2
echo -a %colorao1 -------------------------------------- %colorao2
//set %asong $sfile(D:)
echo -a %colorao1 The song is: %asong %colorao2
}
on *:dialog:wake_dialog:sclick:9:{
if (%WakeON! == OFF) { set %timewake Not defined yet | set %datewake Not defined yet | .timers off | set %check off | .timerdialogd off | set %12click 1 | set %11click 1 | set %13click 1 | setmsgOFF }
.timerdialogd off | set %12click 1 | set %11click 1 | set %13click 1
}
on *:dialog:wake_dialog:sclick:6:{ set %WakeON! OFF | unset %click13 | unset %click12 | unset %click11 | set %timewake Not defined yet | set %datewake Not defined yet | .timers off | set %check off | .timerdialogd off | set %12click 1 | set %11click 1 | set %13click 1 | setmsgOFF }
on *:dialog:wake_dialog:sclick:7: { set %timewake $$?"Set here the time to wake for example $time $+ " }
on *:dialog:wake_dialog:sclick:8: {
if (*:* iswm %timewake) {
set %datewake $$?"Set here the date of the day for example $date $+ , if the day is today type: today" | today
}
if (*:* !iswm %timewake) {
echo -a %colorao1 1Set first the time. %colorao2
}
}
on *:dialog:wake_dialog:sclick:15: {
if (%WakeON! == OFF) {
if (*/* iswm %datewake) {
.timer 1 1 set %WakeON! ON
echo -a %colorao1 1The alarm clock is 3ON1 for date: %datewake Time: %timewake $+ . 1Status: Notice: %notice? $+ , MSG %MSG? $+ , Music: %Music? $+ . %colorao2 | timerdialog }
if (*/* !iswm %datewake) {
echo -a %colorao1 1The alarm clock is 4OFF1 set the Date and the Time first. %colorao2 }
}
if (%WakeON! == ON) { echo -a %colorao1 1The alarm clock is already 3ON!!!1 %colorao2 }
}
alias timerdialog {
timer 0 1 timercheak
}
alias setmsg {
if (%Askmsg == 1) { set %MSG? 3ON1 }
if (%AskNotice == 1) { set %notice? 3ON1 }
if (%Askmusic == 1) { set %music? 3ON1 }
if (%Askmusic == 0) { set %music? 4OFF1 }
if (%AskNotice == 0) { set %notice? 4OFF1 }
if (%Askmsg == 0) { set %MSG? 4OFF1 }
}
alias setmsgOFF {
set %MSG? 4OFF1
set %notice? 4OFF1
set %music? 4OFF1
}
alias timercheak {
set %timer $time
if ($time == %timewake) && ($date == %datewake) {
set %timerstop 1
echo -a %colorao1 12Time to wake up3!!!. 12The time is3:4 $fulldate 12Type: 3!12stop to stop the music3. %colorao2
if (%Askmsg == 1) { msg $me %colorao1 %wakemsg %colorao2 }
if (%Asknotice == 1) {
notice $me %colorao1 Wake UP!! %colorao2
notice $me %colorao1 Wake UP!! %colorao2
notice $me %colorao1 Wake UP!! %colorao2
}
if (%timerstop == 1) && (%Askmusic == 1) { splay %asong }
timers off
set %datewake Not defined yet
set %timewake Not defined yet
set %WakeON! OFF
unset %click13
unset %click12
unset %click11
}
}
on *:input:?:{
if (%timerstop == 1) {
if ($1 == !stop) { splay stop | echo -a %colorao1 12The music is 4stoped3. %colorao2 }
set %timerstop 0
}
}
alias Colorao {
set %colorao1 «14GoD1»
set %colorao2 «14GoD1»
}
menu * {
.Alarm Clock:{ dialog -m wake_dialog wake_dialog | Colorao }
}
alias today {
if (%datewake == today) { set %datewake $date }
}