Scrolling Titlebar
Platform: mIRC
Published Dec 13, 2006
Updated Apr 13, 2008
This keeps a constant display in your title bar of the active channel and it's modes, as well as a count of ops, half-ops, voiced and regular users. The balance of the titlebar displays the channel topic in a scrolled (aka marquee) style.
If the active item is not a channel, then your current nick is displayed in the titlebar.
Just load the script into your remotes and have it run the load/start section.
Note, some people have reported that it takes a bit for the scrolling to start. Also, this was designed to work with tiled windows, not windows that are maximized. The titlebar sometimes looks partially duplicated when working with maximized windows.
I will try to figure out a way around this situation and post an update at that time.
Display now uses the information returned via $prefix
This method does take a little bit longer, but most people shouldn't notice the difference (I timed it using $ticks on a channel with 100 nicks, and it only took 2 milliseconds longer).
Added network and nick display, as well as a count-up for the time used in a particular pm window. Display also shows for Status Windows, however, display is inaccurate.
Updated code to show correct time for pm windows if the window was opened before the script started, and shows correct timing using a modified $duration, rather than the old $duration(3), as a pm window that was open for 25 hours now shows as 1 day 1:00:00 not 25:00:00
ctcp *:version:*: ctcpreply $nick VERSION Scrolling Titlebar 04.12.2008 by Russel Bairstow
menu channel,nicklist {
Scrolling Titlebar $iif($group(#Scroll_Titlebar) == On,Off,On) : scroll_titlebar $group(#Scroll_Titlebar)
$iif($group(#Scroll_TitleBar) == On,Titlebar scrolling speed) : set %scroll $$input(Scrolling Speed,e,number of milliseconds,$iif(%scroll,$v1,250)) | .timer.sb -m 0 $iif(%scroll,$v1,250) sb.disp $chan
}
on *:start:{
.titlebar $me
}
alias scroll_titlebar {
if $1 == On {
sb.stop
.disable #Scroll_Titlebar
}
else {
.enable #Scroll_TitleBar
sb.start
}
}
#Scroll_TitleBar on
alias sb.title {
return $chan($1).topic
}
alias sb.break {
return ***
}
alias sb.pre {
return $me $network $1 $chan($1).mode $nickcount($1)
}
alias sb.suf {
return
}
alias sb.stop {
unset %sb.*
.timer.sb off
}
alias sb.start {
unset %sb.*
set %sb.point 0
.timer.sb -m 0 $iif(%scroll,$v1,250) sb.disp $1
}
alias sb.disp {
if $1 ischan {
var %sb.title = $sb.break $strip($sb.title($1))
inc %sb.point 1
if (%sb.point > $len(%sb.title)) set %sb.point 1
var %sb.disp = $right(%sb.title,$calc($len(%sb.title) - %sb.point)) $left(%sb.title,%sb.point)
titlebar $sb.pre($1) %sb.disp $sb.suf
}
else {
titlebar $pm.time($network,$1)
}
}
alias -l nickcount {
var %a = 1, %b = $len($prefix), %nick.count
while %a <= %b {
%nick.count = $+(%nick.count,$nick($1,0,$mid($prefix,%a,1)),$mid($prefix,%a,1),$chr(44))
inc %a
}
return $replace(%nick.count $+ $nick($1,0,r) $+ ø,$chr(44),$+($chr(44),$chr(32)))
}
on *:active:*:{
sb.start $active
}
on *:close:?:{
unset $+(%,time,.,$network,.,$nick)
}
on *:open:?:*:{
set $+(%,time,.,$network,.,$nick) $ticks
}
alias -l pm.time {
if !$($+(%,time,.,$1,.,$2),2) {
set $+(%,time,.,$1,.,$2) $ticks
}
return $1 $2 $elapsed($($+(%,time,.,$1,.,$2),2))
}
alias -l elapsed {
var %elapsed = $calc($ticks - $1), %frac = $calc(%elapsed % 1000)
%elapsed = $duration($int($calc(%elapsed / 1000)))
%elapsed = $iif($numtok(%elapsed,32) < 4,$duration($duration(%elapsed),3),$+($gettok(%elapsed,1--3,32),$chr(32),$duration($duration($gettok(%elapsed,-3-,32)),3)))
return $+(%elapsed,.,%frac)
}
#Scroll_TitleBar end