Creates a progress bar with settings of your choice. Manipulate position, text color, font, font size, bar color, height, width, and text. Includes an example. /progexample to load.
/*
/progressbar by co2(h)
Syntax:
/progressbar <posX> <posY> <w> <h> <bar color> <text color> <font> <font size> <x> <y> <text>
<posX> - Forms window at point X
<posY> - Forms window at point Y
<w> - window length
<h> - window height
<bar color> - Color of the load bar
<x> - How far to the left of the text resides
<y> - How high the text resides (1 being the highest)
Please refer to /progexample below for a working example of /progressbar
*/
alias progressbar {
if ($1-10 && $11-) {
window -dp +b @progress $1 $2 $3 $4
var %x = 1
while %x <= $3 {
drawline @progress $5 $4 $calc($3 - %x) 1 $calc($3 - %x) $calc($4 - 15)
drawtext -o @progress $6 $7 $8 $9 $10 $11-
inc %x
var %y = 1
while (%y <= 100) { inc %y }
}
.timer 1 1 window -c @progress
}
}
alias progexample {
progressbar 203 200 230 25 1 0 Tahoma 10 5 1 Loading...
; let's break down that line:
; 203 is how far to the left the window is created
; 200 is how var below the top of the screen the window is created
; 230 is the length of the progressbar
; 25 is the height of the progressbar
; 14 is the color of the bar line
; 0 is the color of the progressbar text
; Tahoma is the font of the progressbar text
; 10 is the font size of the text
; 5 is how far to the left of the window the text is
; 1 is how far below the top of the window
; And 'Loading...' is the text displayed in the progressbar
; /progexample -> try it out and see for yourself ;)
}
I actually meant that the user could open their own window, and then this alias would draw the progress bar inside of it, rather than the alias opening its own window for the bar to be displayed, and then closing the window afterwards.
A way to still be able to have a variable load speed but not freeze mIRC would be to use global variables, then use a timer to make successive calls to the progressbar alias.