mIRC Home    About    Download    Register    News    Help

Print Thread
#165178 23/11/06 01:12 PM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
how do i get the width of the nicklist?

//echo -a $window(#).w gives me 1030 but thats including the nicklist right?

reason im asing is i need to resize my custom nicklists list box when the nicklist is resized etc

#165179 23/11/06 01:58 PM
Joined: Oct 2003
Posts: 313
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 313
Code:
//echo -a $calc($window(#test).w - $window(#test).dw)


Seems to change as I change the size of the nicklist. Maybe you can play with that a bit - be interested to hear your results wink


Sais
#165180 23/11/06 04:42 PM
Joined: Apr 2004
Posts: 759
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
when i did my Channel Splitter thing i needed this as well:
$calc($window($active).w - $iif($readini($mircdirmirc.ini,nicklist,$active),$calc($gettok($readini($mircdirmirc.ini,nicklist,$active),2,44) + 10),105))

Seemed to do the trick for me and most other people.Though i wouldn't put my life on it whether its a failsafe method or not. Especially since that 10 value is for the scrollbar and 105 seemed to be the default width for the nicklist on my PC.

This all reminds me I seriously need to update that thing lol.


$maybe
#165181 23/11/06 09:39 PM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
Sais that seems 100% correct

//echo -a $Calc($Window(#).w - $Window(#).dw)

now i need some way of being able to set the nicklist width by code and increasing/decreasing the width of the nicklist automatically by code

is this even possible?

#165182 24/11/06 04:38 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
from memory "no" (with out a dll {not that i know of one to do it})

#165183 03/12/06 05:50 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
$mircdirmirc.ini isn't a reliable thing to use as someone could change the location of the mirc.ini used using the -i<file> commandline switch. I'd recommend using $mircini instead.

#165184 03/12/06 06:33 PM
Joined: Apr 2004
Posts: 759
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
Yes i know, i meant that post as "At the time of doing this this seemed to do the trick"

the $mircdirmirc.ini was just one of the many reasons why i said "i seriously need to update this" :P


$maybe

Link Copied to Clipboard