on *:start:{
if (%1.txt) {
set %dlines $lines(1.txt)
timer1.txt 0 30 check
}
}
alias check {
if (!%dlines) set %dlines $lines(1.txt)
if ($1 = on) timer1.txt 0 30 check
elseif ($1 = off) timer1.txt off
elseif (%dlines < $lines(1.txt)) {
set %dlines $lines(1.txt)
var %2 = $v2, %c_ = $calc(%2 - $v1), %cx_ = $calc(%2 - %c_)
while ($read(1.txt,%cx_)) {
msg %dchan : $v1
inc %cx_
}
}
}
menu menubar {
Check Text
.$iif(%1.txt,$style(1)) on:check on
.$iif(%1.txt,$style(1)) off:check off
.-
.$iif($chan,Set Channel):set %dchan $chan
}