mIRC如果Timer X正在运行

时间:2016-07-29 18:46:23

标签: irc mirc

我想制作一个if语句来检查定时器是否正在运行!

实施例

on *:text:*ABC*:#: { 
  if timerX is running { msg $chan Working! }
}

2 个答案:

答案 0 :(得分:0)

没有必要使用属性“.secs”,如果你只是想检查定时器是否正在运行

顺便说一下,我不建议在“on text”比赛中使用通配符,因为它可以匹配所有内容。

on $*:text:/^!timercheck\s(.+\s)/:#:{ if ($timer($regml(1))) { code here for working} else { code here for not working } }

或者您可以使用$ iif

on $*:text:/^!timercheck\s(.+\s)\s/:#:{
msg $chan $+($nick,:) Timer $qt($regml(1)) is $iif(!$timer($regml(1)),not) running
}

例如

^ =行中的第一件事 \ s =命令后的空格
(。+ \ s)=空格后的第一个单词

答案 1 :(得分:-1)

on *:TEXT:*ABC*:#:{
  if ($timer("name").secs) { msg $chan working }
}