mIRC Homepage

Nicklist srollbar

Posted By: Doctor_Souza

Nicklist srollbar - 15/02/19 07:29 PM

how to check if nicklist has srollbar and no has scrollbar?
Posted By: Matt5150

Re: Nicklist srollbar - 18/02/19 07:08 PM

Hello,
Sorry for my bad english, it's not my native language.
I did a very rough way. You can check if there are more nicknames in a channel than the height of the window / vertical spacing.
For example, I'm using the font Verdana, size 13. The vertical spacing is 17 (so if the window height is 170, there are 10 lines).
So just edit the 17 according to your font size.
Code:
alias chscrollbar {
  if ($nick(#,0) >  $calc($window(#).dh / 17)) { return $true }
  else { return $false }
}

I hope you understand what I mean.
~cheers

EDIT: I don't know if there is a native way (or a better way) to do that, I tested this and looks like it works
Posted By: Raccoon

Re: Nicklist srollbar - 19/02/19 01:51 AM

use $height() instead of 17.
Posted By: Matt5150

Re: Nicklist srollbar - 20/02/19 04:19 PM

Uh thanks for the help @Raccoon, I didn't know that identifier.
So something like $height(a,$window(#).font,$window(#).fontsize) should give you the current and correct height, right?
Posted By: maroon

Re: Nicklist srollbar - 20/02/19 08:41 PM

looks like something closer to this is working

Code:
//var -s %a $window( # ).dh , %b $height(a,$window($active).font,$window( # ).fontsize) | echo -a $calc( %a / %b )

© 2019 mIRC Discussion Forums