Skip to content
General IRCX

Statusbar

A TG007 community discussion started by Rhys.

Discussion 8 posts
Page 1 of 1
Open
Topic #4471 · 8 published posts · 1,983 views

I just downloaded a statusbar from elite scriptaz, and i've managed to change the text and stuff, but it has some icon things, but i don't know how to add them. here is the code below.

alias statusbar {
;Alias for the status bar
 dll $ktools CreateSb
;sbparts - sets the size of the bars you will fix this up your self. to what ever you make it into.
 dll $ktools SbSetParts 160 459 790 -1 
------;Sets the icon you want if you want to change them you will have to set your dir and open it and chose the icon you want.
 dll $ktools SbAddIcon 21, $+ pics\qnx.icl
 dll $ktools SbAddIcon 0, $+ pics\qnx.icl
 dll $ktools SbAddIcon 51, $+ pics\qnx.icl
 dll $ktools SbAddIcon 17, $+ pics\qnx.icl
;Number of boxers for the information you can set as much as you want. on the information you want in the status bar
 dll $ktools SbSetIcon 0 > 0
 dll $ktools SbSetIcon 1 > 1
 dll $ktools SbSetIcon 2 > 2
 dll $ktools SbSetIcon 3 > 3
-----
;geting to the information you want in the boxers now. you can set diff styles in the status bar as i will show you soon just school down to -styles
 dll $ktools SbSetText 0 > popout > blah
 dll $ktools SbSetText 1 > popout > blah
 dll $ktools SbSetText 2 > popout > blah
 dll $ktools SbSetText 3 > popout > blah
 .timerbar 0 1 stupdate
}
alias stupdate { 
 dll $ktools SbSetText 0 > popout > blah
 dll $ktools SbSetText 1 > popout > blah
 dll $ktools SbSetText 2 > popout > blah
 dll $ktools SbSetText 3 > popout > blah
}

 

inbetween the two ----- is all the code for the icons i think. remove before trying the code

you will need an alias for ktools. what im realy asking for help for is to add a different icon to each box. i did egt an icon in there, after i opened it, and typed /statusbar, an icon would appear in the 1st box. i do it again and the same icon would appear in the 2nd box and so on...

Edited Aug 8, 2005 11:43 PM by xRhysx

You've specified an icon library file but you haven't specified which icon to use. I think the correct format is dll $ktools SbAddIcon 21, $+ pics\qnx.icl,1, where 1 is the first icon in the library

 

i don't understand. is this part correct, i have just changed it.

 

 dll $ktools SbAddIcon 1, $+ icons\wi0064-16.ico,1
 dll $ktools SbSetIcon 0 > 1

 

btw, it doesen't work

 

EDIT: don't worry, i have now fixed it.

fix: use the following for ALL your icons:

dll $ktools SbAddIcon 0, $+ icon.ico

dll $ktools SbSetIcon 1 > 1

 

change the 0 on the first line if you are using a .ICL, to the number of the icon you want, else leave it 0 for any other files. this will put the icons down in order you add them. if you want more help, just reply and i'll explain in more detail

 

i have another question. how can i find how many channels im on altogether, through multiple servers? not just the current server.

Edited Aug 9, 2005 4:03 AM by xRhysx

bump

try using a while loop to run through all the servers, and use /scon N to change the active connection to the Nth server, then just use another while loop to run through all the channels on that server

"the important thing was, that i had an onion on my belt, which was the style at the time"

i don't know how to use /scon and i ain't too good with loops

alias achan {
 var %l = 1 , %c = 0
 while ($scon(%l)) { scid $ifmatch | %c = %c + $chan(0) | inc %l }
 return %c
}

 

then just use $achan

 

and it should return the total amount of channels you are in

thanks it works great