XxKanexX
2006-03-22 03:19:40
Read the commented space at the start of the script for a better understanding.
Bored, once again.
{
------------------------------------------------
Timer v.1
------------------------------------------------
When you start the script, if the timer is paused,
press shift and it will begin.
------------------------------------------------
Just like a normal timer. Will wait 60 ms before
adding 1 second, 60 seconds before 1 minute,
60 minutes before 1 hour, 24 hours before 1 day.
------------------------------------------------
To Pause : press shift quickly
To Resume: press shift again.
------------------------------------------------
Pressing control will add the current time to
the report box under any other times. If the
constance "ResOnCtrl" is true, the timer will
begin from 0 again. If not, it will continue.
------------------------------------------------
Made By XxKanexX
}
const
ResOnCtrl = True; //Resest timer on control press?
var
a, b, c, d, e: Integer;
i, disp: Integer;
times: Array Of String;
change: Boolean;
begin
while(isfunctionkeydown(1))do
wait(1);
setarraylength(times, 1);
clearreport;
changereportwidth(500);
repeat
repeat
cleardebug;
if(change)then
begin
clearreport;
for disp:= 0 to getarraylength(times)-1 do
addtoreport(times[disp]);
change:= false;
end;
writeln(inttostr(e)+':'+inttostr(d)+':'+inttostr(a)+':'+inttostr(b)+':'+inttostr(c));
c:= c + 1;
if(c >= 60)then
begin
c:= 0;
b:= b + 1;
end;
if(b >= 60)then
begin
b:= 0;
a:= a + 1;
end;
if(a >= 60)then
begin
a:= 0;
d:= d + 1;
end;
if(d >= 24)then
begin
d:= 0;
e:= e + 1;
end;
wait(16);
if(isfunctionkeydown(3))then
begin
wait(200);
repeat
wait(50);
until(isfunctionkeydown(3));
wait(200);
end;
until(isfunctionkeydown(1));
while(isfunctionkeydown(1))do
wait(1);
times[i]:= inttostr(e)+':'+inttostr(d)+':'+inttostr(a)+':'+inttostr(b)+':'+inttostr(c);
i:= i + 1;
setarraylength(times, getarraylength(times)+1);
change:= true;
if(resonctrl)then
begin
a:= 0;
b:= 0;
c:= 0;
d:= 0;
e:= 0;
end;
until(false);
end.
Bored, once again.