mIRC Home    About    Download    Register    News    Help

Print Thread
#112313 22/02/05 08:28 PM
Joined: Jan 2005
Posts: 37
S
Scratch Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Jan 2005
Posts: 37
I think it would be useful if the $timer() identifier allowed the use of wildcards.

For example:

If I had 3 timers called:

Test1
Test2
Test3

and if I did:

//echo -a $timer(Test*,0)

mIRC would return: 3

#112314 22/02/05 09:24 PM
Joined: Dec 2002
Posts: 208
H
Fjord artisan
Offline
Fjord artisan
H
Joined: Dec 2002
Posts: 208
I agree. In the mean time, I've been using this alias to do just that:

Code:
wtimer {
  var %loop = 0, %temp
  while (%loop < $timer(0)) {
    inc %loop
    if ($1 iswm $timer(%loop)) %temp = $addtok(%temp,$v2,32)
  }
  if ($2 == 0) return $numtok(%temp,32)
  elseif ($2 isnum 1-) return $gettok(%temp,$2,32)
  else {
    echo -atc info wtimer:  invalid parameters
    halt
  }
} 


then just use $wtimer the way you suggested being able to use $timer


If I knew now what I will know then... maybe things will have been different...
#112315 23/02/05 02:11 AM
Joined: May 2004
Posts: 27
N
Ameglian cow
Offline
Ameglian cow
N
Joined: May 2004
Posts: 27
easy to do with scripting...

Code:
alias _timer {
if ($isid) && ($1) {
var %x = 1, %y = 0
while ($timer(%x)) {
if ($1- iswm $timer(%x)) inc %y
inc %x
}
return %y
}
}
 


example: //echo -a $_timer(*t*)
they returns the numbers of timers with the chr T in the name..., and you can add some if's for add support for command...


---

Nixor's - http://xoniq.tk
#112316 23/02/05 11:46 AM
Joined: Apr 2004
Posts: 871
Sat Offline
Hoopy frood
Offline
Hoopy frood
Joined: Apr 2004
Posts: 871


Saturn, QuakeNet staff

Link Copied to Clipboard