mIRC Homepage
Posted By: coax Titlebar stats - 11/10/05 06:49 PM
I currently have this in my on connect event:

titlebar $me on $network $+ ( $+ $server $+ ) . The time is $fulldate

And thi works whenever a user connects, however my problem is I want the titlebar to update everytime someone changes server tabs, or clicks on a channel on another network..
Any idea on how I can do this?
Posted By: LostShadow Re: Titlebar stats - 12/10/05 12:09 AM
To update the $network and stuff, use $!network instead.

However, since you are /titlebar once, you want to /timer it with -o every second (as an auto-update). Therefore, it will take you up to a second for your titlebar to update itself.

I know this because I have a clock in my titlebar and $active channel bans which changes by the second.
Posted By: coax Re: Titlebar stats - 12/10/05 01:04 AM
that sort of works, it doesnt update $active when i try though..

in nnscript, it updates instantly, even under 1 second, how would one go about doing that?
Posted By: RusselB Re: Titlebar stats - 12/10/05 02:04 AM
still use a timer, but set it to run in milliseconds rather than seconds
Code:
 /timer -m 0 250 /titlebar <your titlebar information>
 

the -m makes the timer work in milliseconds, so 250 is 250 milliseconds, or 1/4 of a second (ie: 4 times per second)

Please note that millisecond timers are harder on system resources than regular timers.
Posted By: MeStinkBAD Re: Titlebar stats - 14/10/05 02:47 AM
I'd use a delay of 50 ms. 20 times a second. Also I'd use the SIGNAL event.

Code:
/timer -om 0 50 /SIGNAL -n TITLEBAR.UPDATE
 
ON *:SIGNAL:TITLEBAR.UPDATE: {
   /titlebar <your titlebar information>
}


You could have it trigger an ALIAS but that can spell disaster if something goes wrong. Besides SIGNAL let's you modify the timer from several scripts.
© mIRC Discussion Forums