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!
also, if in mirc no channel is selected but a server window, how would i know that?
EDIT: nm, I fixed that
if ( %t != $null ) {
drawtext -on @user 1 tahoma -11 $int($calc((48 - $width(%t, tahoma, -11, 1)) / 2)) 7 %t
}
Instead of using a timer try using the on ACTIVE event.
Great thanks!
For people who are interested here is the final version:
nomorepasting
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?
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.
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?