Progress Bar

By Jonesy44 on Apr 07, 2008

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):

Image (Name It: bar_grey.gif)
Image (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

Comments

Sign in to comment.
Jonesy44   -  Apr 08, 2008

Thanks for the comment, timer\'s were supposed to be sileneced, my bad. update in a sec.
I\'m not sure about using this kinda thing in a dialog ? or how to go about it completely, i\'ll look into it further tmoro

 Respond  
BloodHound   -  Apr 08, 2008

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.

 Respond  
Jonesy44   -  Apr 08, 2008

tested it? Then yall understand.

If youre refering to the link above . Read the help files (y)

 Respond  
Eugenio   -  Apr 07, 2008

LOL wtf

 Respond  
xDaeMoN   -  Apr 07, 2008

You can use dcx.dll which has a progress bar as well for dialogs.

http://dcx.scriptsdb.org/pbar.htm

 Respond  
Jonesy44   -  Apr 07, 2008

Tis indeed, but you can run a picwin in the bg i guess.

 Respond  
^Neptune   -  Apr 07, 2008

Pity it can\'t be used in a dialog :(

 Respond  
Jonesy44   -  Apr 07, 2008

can i have a 10 for being useless ? :D

But seriously, like i said, if this is integrated into a big, more useful script it could be real nice :p

 Respond  
^Neptune   -  Apr 07, 2008

Heh. Extremely useless on its own, but if you put it into something much larger it would be cool. :P

Like a window MP3 Player for instance, that could be the position bar.

 Respond  
Jonesy44   -  Apr 07, 2008

**UPDATED - You no longer need the images, it will use skanky mirc defaul rectangles if they\'re not found :P**

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.