SRL Archive - Other Scripts

Aznrx Alarm : Ringer


aznrx

2006-08-24 16:44:55

Alarm : Ringer

First of its kind in the scripting world.



/////////////////////////////////////////////////////////////////////////
// v Alarm : Ringer v //
/////////////////////////////////////////////////////////////////////////
// + This script may be used as a timer or an alarm in the daytime, //
// for the people who like to sleep near their computers. //
// + Dont use as an alarm to wake you up for work. Obvious reasons. //
// + Test if the sounds play by setting WakeUpTS to 1 (second). //
// + Released 08/23/06. //
// + Script created and tested by AznRx. //
/////////////////////////////////////////////////////////////////////////
// v Instructions v //
///////////////////////////////////////////////////////////////////////// //
// 1. Setup constants (Timing Setup). //
// 2. Turn up your speakers a bit louder than usual. //
// 3. Press Play. //
/////////////////////////////////////////////////////////////////////////

Program Alarm_Ringer;
var i : integer;

const
{========[ Timing Setup ]===========================================}

//When do you want the alarm to ring?

WakeUpTH = 0; // In an hour? 1 hour = 60 mins.
WakeUpTM = 0; // In a minute? 60 mins = 1 hour.
WakeUpTS = 1; // In a second? 60 secs = 1 minute.

Times = 10; // How many times for the ringer to ring

{=========[ End Setup ]=============================================}

procedure report;
begin
cleardebug;
writeln('Rang alarm '+inttostr(i)+' times.')
end;

procedure Alarm;
begin
sleep(2500);
PlaySound('C:\WINDOWS\Media\Notify.wav');
i:=i+1
end;

begin
i:=0
report;

if WakeUpTH > 0 then
begin
sleep(wakeupTH*3600000)
end;

if WakeUpTM > 0 then
begin
sleep(wakeupTM*3600000/60)
end;

if WakeUpTS > 0 then
begin
sleep(WakeUpTS*1000)
end;

repeat
alarm;
report;
writeln('_____________________________________________________________')
writeln('')
writeln('Script brought to you by your friendly, nieghbourhood, AznRx.')
until(i=Times)
writeln('')
writeln('Wake Up!')
writeln('_____________________________________________________________')
end.

Feedback, Comments, Bugs, please post here
- Aznrx

aznrx

2006-08-27 04:04:51

6 views? no replies? :eek:

Sumilion

2006-08-27 06:47:54

Well whats there to say :p , it's funny, but useless :rolleyes:

aznrx

2006-08-27 14:35:14

haha does it work for you sub zero?

Sumilion

2006-08-27 15:48:54

Dunno, haven't tried it :rolleyes: , ill try it right now and post a progress report…

Edit : YEAH, it worked :D, your a genius! :p, but seriously, this is rather cool ;)

aznrx

2006-08-27 16:57:02

i was twidling around with the scar files and i found 'test sound plugins'
then i built this script from it =D

Ruroken

2006-08-27 19:53:38

thats a awsome script very original =)

aznrx

2006-08-28 00:52:04

thanks for feedback guys =D