mIRC Home    About    Download    Register    News    Help

Topic Options
#265019 - 15/02/19 07:29 PM Nicklist srollbar
Doctor_Souza Offline
Pikka bird

Registered: 16/02/17
Posts: 19
how to check if nicklist has srollbar and no has scrollbar?

Top
#265035 - 18/02/19 07:08 PM Re: Nicklist srollbar [Re: Doctor_Souza]
Matt5150 Offline
Pikka bird

Registered: 01/09/10
Posts: 10
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

Top
#265037 - 19/02/19 01:51 AM Re: Nicklist srollbar [Re: Matt5150]
Raccoon Offline
Hoopy frood

Registered: 18/02/03
Posts: 2566
use $height() instead of 17.
_________________________
At least I won lunch.
Good philosophy, see good in bad, I like!

Top
#265042 - 20/02/19 04:19 PM Re: Nicklist srollbar [Re: Raccoon]
Matt5150 Offline
Pikka bird

Registered: 01/09/10
Posts: 10
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?

Top
#265046 - 20/02/19 08:41 PM Re: Nicklist srollbar [Re: Matt5150]
maroon Offline
Hoopy frood

Registered: 12/01/04
Posts: 1109
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 )



Edited by maroon (20/02/19 11:23 PM)

Top