mIRC Home    About    Download    Register    News    Help

Print Thread
#23384 09/05/03 02:21 PM
Joined: May 2003
Posts: 177
P
Prizm Offline OP
Vogon poet
OP Offline
Vogon poet
P
Joined: May 2003
Posts: 177
I think the $timer(N/name) identifier should allow wildcards to see if timers are active.

Ex:

Let's say I have 3 timers:

test1
test2
test3

And I use an alias like this

alias test {
if ($timer(test*)) { commands }
}

See what I'm trying to suggest? I imagine it could be useful for many purposes.

#23385 09/05/03 02:34 PM
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031
Yes I could use that myself .. good idea.
It could be done with a while loop though.
Code:
alias wildtimer {
  var %i = 1
  while ($timer(%i)) {
    if ($1 iswm $timer(%i)) return $true
    inc %i
  }
  return $false
}

So your TEST alias would be
Code:
alias test if ($wildtimer(test[color:red]*[/color])) { commands }


But it would be nice for it to be added to $timer()


Link Copied to Clipboard