Dumpin
2007-11-16 15:36:26
Function CountDownSeconds(Time: integer): boolean;
var
Ti : integer;
begin
Ti:= Time;
repeat
wait(1000);
Ti := Ti -1;
Writeln(inttostr(Ti));
until(Ti = 0);
result :=true;
end;This script Does a countdown in seconds, pretty easy but maybe its usefull for beginners :)
Fill it in as:
CountDownSeconds(5);5= time of seconds :)
V2 with sound!!! :
Function CountDownSeconds(Time: integer): boolean;
var
Ti : integer;
begin
Ti:= Time;
repeat
wait(1000);
Ti := Ti -1;
playSound('C:\WINDOWS\Media\ding.wav');
Writeln(inttostr(Ti));
until(Ti = 0);
result :=true;
end;V3 added 10 seconds later =P
Function CountDownSeconds(Time: integer): boolean;
var
Ti : integer;
begin
Ti:= Time;
repeat
wait(1000);
Ti := Ti -1;
playSound('C:\WINDOWS\Media\ding.wav');
Writeln(inttostr(Ti));
until(Ti = 0)
result :=true;
playSound('C:\WINDOWS\Media\tada.wav');
end;plays nice sound after finishing the countdown
Easy huh? good luck