Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
var hours, // number of hours into the future we want the alarm to go off
mins: Word; // number of minutes into the future we want the alarm to go off
alarmtime: TDateTime; // time we want the alarm to go off
alarmset: Boolean;
begin
{ add code to get values for hour and min here }
hours := StrToIntDef(InputBox('hours', 'hours: ', '0'), 0);
mins := StrToIntDef(InputBox('mins', 'mins: ', '0'), 0);
alarmtime := Now + EncodeTime(hour, min, 0, 0);
alarmset := True;
end;
begin
if alarmset and (Now >= alarmtime) then begin
ShowMessage('Dingdingdingdingding!')
alarmset := False;
end;
end;