/* INDAY-REMINDER v1.0 */ /* This macro will constantly check when In Day reminder are due and pop-up a requester for it. Mild reminders will be SAID, normal will have a window and urgent will have a window, flash/beep and be said!!! */ if(~show('l', 'rexxsupport.library'))then do if(~addlib( 'rexxsupport.library', 0, -30, 0))then do say "Could not open ARexx support library." exit 10 end end urglis=0 norlis=0 mldlis=0 dun=0 if exists('s:Reminder.DAT') then do if open('pafil','s:Reminder.DAT','r') then do hedr=readln('pafil') if substr(hedr,1,9) = "KBErmPath" then do pth=substr(hedr,10) orig_path=pragma('d',pth) end end end if open('txot','CON:80/88/480/80/Initializing In Day Reminder Checker...','w') then do writeln('txot','1b'x||"[4m"||'1b'x||"[1mCLI-Reminder"||'1b'x||"[22m - In Day appointment checker v1.0"||'1b'x||"[0m") writeln('txot','1b'x||"[32m©1993 KBE Software - Written by Damon Bennett."||'1b'x||"[0m") writeln('txot','Please Wait ... Initializing ...') if open('datfil','InDay.Data','r') then do hedr=readln('datfil') if substr(hedr,1,7)="KBErmIn" then do num_recs=strip(substr(hedr,8),'t','0d'x) rcno=0 do for num_recs exps=readln('datfil') ttls=readln('datfil') nots=readln('datfil') rems=readln('datfil') if date('i')=date('i',substr(exps,5,4)||substr(exps,3,2)||substr(exps,1,2),'s') then do rcno=rcno+1 exp.rcno=exps ttl.rcno=ttls rem.rcno=rems dun.rcno=0 end end end call close('datfil') end else rcno=0 if rcno=0 then writeln('txot','No appointments set for today .. quitting') else writeln('txot',rcno 'record(s) found for today .. All systems go!') call delay(120) call close ('txot') end drop hedr pth orig_path num_recs exps ttls nots rems if rcno>0 then do do forever do dumc=1 to rcno acth=substr(exp.dumc,9,2) actm=substr(exp.dumc,11,2) actt=(60*acth)+actm advt=substr(rem.dumc,1,2) adty=substr(rem.dumc,3,1) acty=substr(rem.dumc,4,1) norlis=0 urglis=0 if time('m')>=actt-advt & time('m')=actt & time('m')0 then do if open('nlis','con:0/0/640/'||30+(8*norlis)||'/List of normal Appointment reminders...','w') then do call pragma("*",'nlis') if open('uin',"*","r") then do do a=1 to norlis writeln('nlis',nlistxt.a) end writeln('nlis','Press RETURN to remove this window') dmv=readln('uin') call close ('uin') end call pragma("*") call close('nlis') norlis=0 end end if urglis >0 then do if open('nlis','con:0/0/640/'||60+(8*urglis)||'/List of URGENT Appointment reminders...','w') then do call pragma("*",'nlis') if open('uin',"*","r") then do do a=1 to urglis writeln('nlis',ulistxt.a) end if open('spo','SPEAK:opt/s200/f','w') then do writeln('spo','Warning, Urgent appointments need attention') call close('spo') end writeln('nlis','Press RETURN to remove this window') dmv=readln('uin') call close ('uin') end call pragma("*") call close('nlis') urglis=0 end end drop acth actm actt advt adty acty norlis urglis nlistxt. ulistxt. a dmv call delay(50*60) if exists('ram:stopinday') then do call delete('ram:stopinday') exit end end end