mIRC Home    About    Download    Register    News    Help

Print Thread
$nick($active,0) #165929 03/12/06 04:53 PM
Joined: Aug 2004
Posts: 237
L
LethPhaos Offline OP
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Aug 2004
Posts: 237
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!

Re: $nick($active,0) #165930 03/12/06 05:02 PM
Joined: Aug 2004
Posts: 237
L
LethPhaos Offline OP
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Aug 2004
Posts: 237
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
  }

Last edited by LethPhaos; 03/12/06 05:07 PM.
Re: $nick($active,0) #165931 03/12/06 06:02 PM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Instead of using a timer try using the on ACTIVE event.

Re: $nick($active,0) #165932 03/12/06 06:32 PM
Joined: Aug 2004
Posts: 237
L
LethPhaos Offline OP
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Aug 2004
Posts: 237
Great thanks!

For people who are interested here is the final version: nomorepasting

Re: $nick($active,0) #165933 03/12/06 07:04 PM
Joined: Aug 2004
Posts: 237
L
LethPhaos Offline OP
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Aug 2004
Posts: 237
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?

Last edited by LethPhaos; 03/12/06 07:11 PM.
Re: $nick($active,0) #165934 04/12/06 07:44 AM
Joined: Aug 2004
Posts: 237
L
LethPhaos Offline OP
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Aug 2004
Posts: 237
anyone?

Re: $nick($active,0) #165935 04/12/06 01:36 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
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.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Re: $nick($active,0) [Re: LethPhaos] #165984 05/12/06 10:15 AM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
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?