First thing you'll need to do is download these images to your mIRC directory (usually, C:Program FilesmIRC)(type //run $mircdir if u need to find out where it is):
(Name It: bar_grey.gif)
(Name It: bar_blue.gif)
Im sure this script can be made a hell of alot better, but it's my first go at this kinda thing. this runs on timers, but you coould of course run it on a progress of process etc..
UPDATED - You no longer need the images, it will use skanky mirc defaul rectangles if they're not found :P
;; By Jonesy44
;; Usage /tw <time in secs>
;; www.hawkee.com
;; Version 1.1
alias tw {
if (!@timer) {
window -p @.timer
}
clear @timer
set %rect.t $1
set %rect 0
if (!$file(bar_grey.gif)) {
echo -a bar_grey.gif File Not Found - Using Grey Rectangle Instead
drawrect -f @timer 14 14 2 2 1000 50
}
else {
drawpic -tcsm @timer 1 2 2 1000 50 bar_grey.gif
}
if (!$file(bar_blue.gif)) {
echo -a bar_blue.gif File Not Found - Using Blue Rectangle Instead
}
.timerrect $1 1 /update.rect
drawtext @timer 1 3 60 $duration(%rect,3) / $duration(%rect.t,3) ( $+ $round($calc((%rect / %rect.t) * 100),2) $+ % $+ )
}
alias update.rect {
if (!$window(@timer)) {
.timerrect off
unset %rect
unset %rect.t
halt
}
inc %rect 1
clear @timer
if (!$file(bar_grey.gif)) {
drawrect -f @timer 14 14 2 2 1000 50
}
else {
drawpic -tscm @timer 1 2 2 1000 50 bar_grey.gif
}
if (!$file(bar_blue.gif)) {
drawrect -f @timer 11 11 2 2 $calc((%rect / %rect.t) * 1000) 50
}
else {
drawpic -tscm @timer 1 2 2 $calc((%rect / %rect.t) * 1000) 50 bar_blue.gif
}
drawtext @timer 1 3 60 $duration(%rect,3) / $duration(%rect.t,3) ( $+ $round($calc((%rect / %rect.t) * 100),2) $+ % $+ )
}
;; Post any bugs/errors
1- You might as well just remove the error checking for the files, I think the script is fine without using them. It just floods the status window with a \'cannot find\' this and such.
2- Please prefix your timers with . to make them silent, we also don\'t need irritable echoes with \'timersoandso activated\' etc.
3- Pretty neat, I think you might be able to put this in a dialog using an icon and did -g as well for those who\'d like it. I\'m not sure though.