Arexx timer help
24-Oct-94 05:17:15
Sb: #43178-Arexx timer help
Fm: Ken Cooper 73627,2334
To: Charles Blaquiere 76046,1756
Hi Charles,
Here's an Arexx program I wrote that might help you. Put a line in your
program such as: "run Clock.rexx". Also add a few setclip()'s for various
items (see the ERROR section). Edit the Clock program to send whatever
command to your 'PORT' name…
—————-
/* Clock.rexx by Ken Cooper Sep-18-1994 */
options results
signal on ERROR
call setclip('ClockStatus','Waiting')
WaitMin = getclip('ClockTime')
WaitSec = WaitMin * 60
if WaitMin > '0' then do forever
if getclip('Clock') ~= 'Run' then break
LastSec = getclip('ClockLast')
if LastSec = '' then break
if LastSec + WaitSec > time('s') then ,
call delay(((LastSec + WaitSec) – time('s')) * 50)
LastSec = getclip('ClockLast')
if LastSec = '' then break
if LastSec + WaitSec > time('s') then call delay(WaitSec * 50)
else do
if show("P","HOST") then do
if getclip('Clock') = 'Run' then do
call SendParsed('PORT','ClockSave')
call setclip('ClockLast',time('s'))
end
else signal ERROR
end
else signal ERROR
end
end
ERROR:
call setclip('ClockStatus')
call setclip('ClockTime')
call setclip('ClockLast')
call setclip('Clock')
exit