Equation needed for a scripting language = Algebra/Trig

CodeCode

New member
Joined
Nov 10, 2021
Messages
1
Hello, I am no math wiz. So I have a question that I am having trouble with.
I have a list that can be any length. A list of text rows that start after two rows of null data.
The rows are scrolled in sections of 37 pixels per row with a mouse scroll action.

The idea is to hide the rows *below* a value of pixels that are 37 pixels times 2 or 74 pixels. The trick to this is that this base needs to repeat in decreasing values in multiples of 37 - The scroll variable called #Scroll# will scroll 'up' into the negatives - up into infinity (not really, only in theory).

The rows are numbered with an index that is named $1 (this is actually a Powershell script for those who tune in. Then again for Rainmeter, desktop customizing).

This is where I got stuck - this 'sort of' works. Hiding the rows but not consistently:

Hidden=(#Scroll#+(($i)*37+3)) <= 37 ? 1 : 0

So to verbalise it goes likea dis:

Hidden equals #Scroll# which starts at zero and is immediately hiding two rows above the visual starting point of the literal 74 pixels 'under' the hidden rows.
Then as the mouse scrolls the list up - which looks like the rows are revealing the rows below - subsequent rows become hidden above the 74 pixel 'horizon'.
The pixel that are 'higher than' the base of 74 or less are not hidden. That is the inline bit that looks like this: "? 1 : 0". 1 = hidden and 0 = not hidden, the ? is the inline 'if' and the : is the inline 'then' of this equation.

Thats it I think, as best I can explain it.

Please be gentle, I'm not sure how to explain so I will endeavor to answer any questions. (if anyone is interested).

Thanks,
cc
 
Top