/tbg

By zonirc on Mar 03, 2006

put it into your remote .

/*
==================================
=                          ENGLISH                                =
==================================
Name: /tbg
Author:zonIRC
Email:zonirc@email.com
Description:Animate toolbar background picture
Syntax: /tbg <repetition> <delay> <file1>,<file2>[,<fileN>]
<repetition>: 
the times of pictures will be animate. Specified it to 0(zero) for continuosly.
<delay>:
the times each file/picture will be changed(in seconds).
<file>:
the filename of the picture where you need to give a fullname and also make sure
it is a file that mirc supported. Its need at least 2 files.
Example:
/tbg 5 2 C:\mIRC\tbg1.bmp,C:\mIRC\tbg2.bmp,C:\mIRC\tbg3.bmp
- it will changed the background picture every 2 seconds and will stop after 15 times.
Which means 3 files x 5 times = 15 times.
Note: to stopped the animation use '/tbg off'
===========================================
=                            BAHASA MALAYSIA                                  =
===========================================
Nama: /tbg
Penulis:zonIRC
Email:zonirc@email.com
Deskripsi:Menganimasikan gambaar latar belakang 'toolbar'
Sintaks: /tbg <pengulangan> <jarakmasa> <fail1>,<fail2>[,<failN>]
<pengulangan>:
jumlah gambar latar belakang akan di ubah. Tetapkan sebagai 0(kosong) untuk tanpa henti.
<jarakmasa>:
masa gambar latar belakang akan di ubah(dalam saat).
<fail>:
nama fail bagi latar belakang di mana anda perlulah memberikan nama penuh bagi fail terbabit
dan juga pastikan fail tersebut di sokong oleh mIRC. Selain itu, anda perlu menyatakan
sekurang-kurangnya 2 fail.
Contoh:
/tbg 5 2 C:\mIRC\tbg1.bmp,C:\mIRC\tbg2.bmp,C:\mIRC\tbg3.bmp
- ianya akan mengubah gambar latar belakang setaip 2 saat dan berhenti selepas 15 kali.
Dimana ianya bermaksud 3 fail + 5 kali = 15 kali.
Nota: untuk memberhentikannya gunakan '/tbg off'
*/

alias tbg {
  if (!$isid) {
    if ($1 = off) {
      if ($timer(tbg)) .timertbg off
    }
    else {
      var %3 = $iif($ isin $3-,$3-,$+($3-,$,0)), %f = $deltok(%3,-1,36), %x = $gettok(%3,-1,36) + 1, %p = $gettok(%f,%x,44), %n = $numtok(%f,44)
      if ($+($1,$2) !isnum) || (!$isfile(%p)) return
      background -l $+(",%p,")
      if ($1 != 1) {
        .timertbg 1 $2 tbg $calc($1 - $iif(%x = %n,1,0)) $2 $+(%f,$,$iif(%x = %n,0,%x))
      }
    }
  }
}

Comments

Sign in to comment.
AmyOUfan   -  Jul 27, 2009

Ok my question is this if someone ads it to a script with credit to you of course, will everyone who downloads it have to change directory. THis might not be correct but wy not edit it to where it is something simular to

$gif($pictures(PictureName.gif),0)) {

cause anytime you have to add a C:\mIRC\ pc name has to be added to right ? Like in my variables for example on my mp3 player variable it is

%plsfilename C:\Users\Amy\Desktop\BelisknerV.4\rockMix

Just a suggestion to make it a easier file path to use & good work i like it. Why not take it a step further & make a dialog for it , this here is clode but still an idea to make adding a gif easier especially for people n ot advanced enough to know a directory path.

dialog G_Bar {
  title "GifBar"
  size -1 -1 93 34
  option dbu
  button "Add Gif", 1, 5 11 31 9, flat
  edit "", 2, 39 10 50 11
  box "", 3, 1 -2 91 35
  text "Directory", 4, 48 2 25 8, center
  button "Button", 5, 6 22 82 8, flat ok cancel
}

on *:dialog:G_Bar:init:*: {
  setset G_Bar dir $did(2)
}

on *:dialog:G_Bar:sclick:1:{
  var %temp.file = $$sfile($iif($isdir($did(G_Bar,2)),$did(G_Bar,2),$mircdir))
  did -ra G_Bar 2 $nofile(%temp.file)
}
 Respond  
eyiezinc   -  Jun 01, 2009

good job zoinirc.Malaysia boleh!! :)

 Respond  
zonirc   -  Mar 03, 2006

i see Nerd... is that the info im write is a bit confusing... can u tell me so I can edited it :P

 Respond  
Nerd   -  Mar 03, 2006

there we have the problem, i had \",\" in the first filename :S
gonna try it later with a fixed filename :)

 Respond  
zonirc   -  Mar 03, 2006

oh yeah Gex i think u know about gif since ur image one of its rite....
one more need to add is that the filename is seperated by a comma(,)

 Respond  
zonirc   -  Mar 03, 2006

well u need to suppy the exact filename and make sure that the file is exists or it will not working.....
example:
/tbg 0 2 C:\Documents and Settings\P4P800-F\Desktop\tbg1.bmp,C:\Documents and Settings\P4P800-F\Desktop\tbg2.bmp,C:\Documents and Settings\P4P800-F\Desktop\tbg3.bmp

  • it will continuosly animate the picture.
    Well actually what it did was just changing the file u specified. If you familiar with gif animation then you can called the file as a frame.
    So, if the file you specified completely containing the different graphic it will not look like an animation but more look like a image changing. It is better if the file being as a frame. I did this bcoz mirc not supported gif and that means the gif animation cant work with it. So this is my style for making it working.
 Respond  
Nerd   -  Mar 03, 2006

alright looked at the wrong language :P
but still not working

 Respond  
Nerd   -  Mar 03, 2006

what is it doing? if it\'s working o_o
the notes don\'t tell much

 Respond  
Gex   -  Mar 03, 2006

not working for me

 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.