mIRC Home    About    Download    Register    News    Help

Print Thread
#132553 11/10/05 06:49 PM
Joined: Oct 2005
Posts: 11
C
coax Offline OP
Pikka bird
OP Offline
Pikka bird
C
Joined: Oct 2005
Posts: 11
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?

#132554 12/10/05 12:09 AM
Joined: Jan 2004
Posts: 509
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
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.

#132555 12/10/05 01:04 AM
Joined: Oct 2005
Posts: 11
C
coax Offline OP
Pikka bird
OP Offline
Pikka bird
C
Joined: Oct 2005
Posts: 11
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?

#132556 12/10/05 02:04 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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.

#132557 14/10/05 02:47 AM
Joined: Apr 2003
Posts: 342
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Apr 2003
Posts: 342
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.


Beware of MeStinkBAD! He knows more than he actually does!

Link Copied to Clipboard