mIRC Homepage
Posted By: GalaxeY titlebar vs timer on start! - 17/10/07 11:00 PM
I tried to search for anything familiar, but could find any so here goes.

Code:
on *:START:{ .timer 0 1 /titlebar $time(HH:nn:ss) }


Now, this doesnt update as it should. Why?`When I take .timer 0 1 /titlebar $time(HH:nn:ss) when I'm in IRC completly, its doing fine, but not on start. any idea on how to fix that?
Posted By: Bekar Re: titlebar vs timer on start! - 17/10/07 11:08 PM
mIRC isn't connected yet, it's "offline". So, use an Offline Timer:

Code:
ON *:START: { .timer -o 0 1 titlebar $time(HH:nn:ss) }

Nice 'n simple.
Posted By: GalaxeY Re: titlebar vs timer on start! - 17/10/07 11:11 PM
ON *:START: { .timer -o 0 1 titlebar $!time(HH:nn:ss) }

would that do any different?
Posted By: Bekar Re: titlebar vs timer on start! - 18/10/07 07:31 AM
Heh, yeah. It'd probably do what you're after. The line I gave above would evaluate in the ON START event, and not update the time, even though it would update the titlebar every second. The ! forces the re-evaluation of the identifier every time the timer triggers.
Posted By: deegee Re: titlebar vs timer on start! - 18/10/07 09:23 PM
Code:
ON *:START:{ .timer 0 1 titlebar $!time(HH:nn:ss) }


> would that do any different?
Yes. smile

There's no need to use the -o switch though...
Originally Posted By: /help /timer
If you are not connected to a server and you start a timer, it defaults to being an offline timer which means it will continue to run whether you are connected to a server or not.

Posted By: RoCk Re: titlebar vs timer on start! - 18/10/07 09:25 PM
Also you should use the -i switch if you want the timer to continue running if the first connection is closed.
© mIRC Discussion Forums