Cześć mam mały problem chciałem ustawić wykonanie procedury co określony czas. W 3 Editach podajemy:
- Edit1 - co ile godzin
- Edit2 - co ile minut
- Edit3 - co ile sekund
Wiec zrobiłem tak:
Timer1.Interval:= StrToInt(Edit1.Text)*3600 + StrToInt(Edit2.Text)*60000 + StrToInt(Edit3.Text)*1000;
Czegoś tu nie rozumiem albo liczyć nie umiem. Bo jak zrobiłem tak:
Edit1=0 Edt2=1 Edit3=0
1 minuta = 60 000 milisekund
Kurcze jak to poustawiać by w editach podawać za ile odpowiednio godzin, minut sekund ma się rozpocząć procedura
procedure TForm1Timer1Timer(Sender: TObject);
begin
Timer1.interval:= Timer1.interval -1;
Label1.caption:='Czas pozostały: '+ inttostr(Timer1.interval);
if Timer2.Interval = 0 then
begin
SpeedButton1.Click();
end;