Basically, when you load up the script, it will ask you to find a music file which you will then have as your set alarm. To use, just type /alarm [time]. the time has to be in hh:mm format, but you don't have to put in am/pm or military time. For example, if I want my alarm to wake me up at 6:30, then I would type /alarm 06:30. Everything else is taken care of. Unfortunately, for simplicity's sake, i only allowed the alarm clock to ring at the next 06:30, whether it be am or pm.
on *:load: { loadshit }
alias loadshit {
dialog -m choose
timer 1 2 dialog -x choose choose
}
on *:dialog:chose:close:*: {
set %alarmnoise $sfile(c:/,please choose a music file)
var %tg $left(%alarmnoise,3)
if (%tg == mp3) {set %tag -p}
if (%tg == wav)||(%tag == wma) {set %tag -w}
if (%tg == idi) {set %tag -m}
else { loadshit }
}
alias alarm { var %alti $1-
if ($len(%alti) == 4) { var %alti 0 $+ %alti }
set %alarmtime %alti
echo 4,7you have just set your alarm to %alarmtime $+ !!
echo 4,7Brought to you by CobraScript::> Email samcobra@gmail.com if you have any problems.
timeralarm -o 0 2 stalarm
set %al 1
}
alias stalarm {
set %curtime $asctime(hh:nn)
if (%curtime == %alarmtime) {
vol -p 65535
splay %tag %alarmnoise
dialog -md stop stop
timerta off
}
elseif (%al) { timerta -o 1 1 tryagain }
}
alias tryagain {
stalarm
}
dialog stop {
title CobraScript
size -1 -1 100 70
option dbu
button "STOP ALARM",1,25 7 75 55
}
on *:dialog:stop:sclick:1 {
stop
dialog -x stop stop
unset %al
}
alias stop {
splay stop
timerta off
unset %alarmtime
unset %curtime
unset %al
}
dialog choose {
title "Choose your Alarm Noise"
size -1 -1 130 10
option dbu
text "Please choose a music file as your alarm noise",1,0 0 120 25
}
Kay i tested it, and it awful!! and none of the editing could of done it, i just added choose to get it to open. when it\'s on i get:
you have just set your alarm to 07:30!!
Brought to you by CobraScript::> Email samcobra@gmail.com if you have any problems.
- Timer alarm activated
- /splay: invalid parameters (line 121, Remotes II)
- /splay: invalid parameters (line 121, Remotes II)
- Timer ta activated
- Timer ta activated
- Timer ta activated
- Timer ta activated
- Timer ta activated
and i removed it and now i\'m getting this major spam:
19:32… Unknown command: STALARM
19:32… Unknown command: STALARM
19:32… Unknown command: STALARM every second (I CAN\'T GET RID OF IT!!)
1/10 <- too good of a rating
P.S. sorry for 3 posts in a row
you didn\'t explain how to choose a music file and adding it:
Go to options and go under sounds->requests and click on the button near the bottom that should start with \"C:\\" and then select a folder that has music in it. then select the file type inside the droplist above the button. Then you go to Sounds and keep pressing the button untill a popup comes up that has music files in it and select the song you want from it. Then click OK and your set.
I hope it helps ^_^