mIRC Homepage
Posted By: LethPhaos $nick($active,0) - 03/12/06 04:53 PM
Well, that does return the number of users on the current channel, but how do I make it work in a multiserver way?

The full script is on nomorepasting if you need it

Thanks for any help!
Posted By: LethPhaos Re: $nick($active,0) - 03/12/06 05:02 PM
also, if in mirc no channel is selected but a server window, how would i know that?

EDIT: nm, I fixed that

Code:
if ( %t != $null ) {
    drawtext -on @user 1 tahoma -11 $int($calc((48 - $width(%t, tahoma, -11, 1)) / 2)) 7 %t
  }
Posted By: hixxy Re: $nick($active,0) - 03/12/06 06:02 PM
Instead of using a timer try using the on ACTIVE event.
Posted By: LethPhaos Re: $nick($active,0) - 03/12/06 06:32 PM
Great thanks!

For people who are interested here is the final version: nomorepasting
Posted By: LethPhaos Re: $nick($active,0) - 03/12/06 07:04 PM
Well, now there is the problem of someone leaving a channel, i'll have to add some scripting to update the number.

the ones i can think of are
on join
on part
on quit
on kick

These are still only the ones when someone else joins/leaves, i also have to fix that when i disconnect the number is erased, that's not a problem.

Anything else you can think of that may need the number to be changed?

EDIT: further, when mIRC isn't activated (but it is visible) I want the number to be updated too, but it doesn't, maybe because $active doesn't exist when mirc isn't the focused application?
Posted By: LethPhaos Re: $nick($active,0) - 04/12/06 07:44 AM
anyone?
Posted By: qwerty Re: $nick($active,0) - 04/12/06 01:36 PM
If anyone can/wants to answer, they will; no need for nudging posts.

Regarding your last question, I can't know why it doesn't update when mirc isn't active, but $active is not the problem, it works even if mirc isn't the active app.
Posted By: hixxy Re: $nick($active,0) - 05/12/06 10:15 AM
I have no idea why it doesn't update either.. perhaps a problem with mIRC not refreshing picture windows when it's not the active application?
© mIRC Discussion Forums