>D 40
M:ts=0 60
M:ta=0 60
res=0
cnt=0
tag=0
from=0
to=0
pw=0
enable=1
tdis=0
lpw=0
tmp=0
hr=0
min=0
once=0
>B
res=is(0 "So|Mo|Di|Mi|Do|Fr|Sa|")
res=is1(0 "Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Okt|Nov|Dez")
ts=17.30
ts=19.50
ts=1.10
ts=12.30
ts=14.10
ts=2
ts=11.57
ts=19.50
ts=3
ts=14.30
ts=20.20
ts=4
ts=12.30
ts=19.50
ts=5
ts=17.30
ts=19.50
ts=6
ts=13.30
ts=16.45
ts=7
ts=6.47
ts=18.30
ts=10
ts=-1
ts=-2
ts=11
ts=-1
ts=-2
ts=12
rnd(-10)
=#copytime
#copytime
for cnt 1 ts[-1] 3
tag=ts[cnt+2]
from=int(ts[cnt])*60+(ts[cnt]*100%100)
to=int(ts[cnt+1])*60+(ts[cnt+1]*100%100)
if from==-60
then
from=sunrise
endif
if to==-120
then
to=sunset
endif
tmp=tag*100%100
if tmp>0
then
from+=rnd(tmp)-(tmp/2)
to+=rnd(tmp)-(tmp/2)
endif
ta[cnt]=from
ta[cnt+1]=to
ta[cnt+2]=int(tag)
next
#wsub
if wm==0
then
wcs {s}
%2.0hours%:%2.0mins%:%2.0secs%
{m}%is[wday]% %0day%-%is1[month]%
%0year%{e}
wcs {s}
Timerliste:
{e}
for cnt 1 ta[-1] 3
if ta[cnt+2]>0
then
wcs {s}%0(cnt/3+1)% :
tmp=ta[cnt+2]
if tmp>=10
then
switch tmp
case 10
wcs täglich
case 11
wcs Mo-Fr
case 12
wcs Sa/So
ends
else
wcs %is[tmp]%
endif
wcs => %2.0(int(ta[cnt]/60))%:%2.0(ta[cnt]%60)% - %2.0(int(ta[cnt+1]/60))%:%2.0(ta[cnt+1]%60)%
if ta[cnt+2]==wday
then
wcs => heute{e}
else
wcs {e}
endif
endif
next
wcs {s}
{e}
endif
>P
tdis=1
>S
if once==0
and tinit>0
then
=#copytime
once=1
endif
min=mins
if chg[min]>0
then
pw=0
for cnt 1 ta[-1] 3
tag=ta[cnt+2]
from=ta[cnt]
to=ta[cnt+1]
if ((tag==wday) or (tag==10) or ((tag==11) and (wday>1) and (wday<7)) or ((tag==12) and ((wday==1) or (wday==7))))
then
if time>=from
and time0
then
tdis=0
endif
if pwr[1]!=pw
and enable>0
and tdis==0
then
=>power1 %pw%
endif
hr=hours
if chg[hr]>0
and hr==0
then
=#copytime
endif
endif
>W
@ck(enable "Timer aktiviert ")
@
%=#wsub