Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 1587

Help: Rainmeter Skins • Re: Clamp and Shape % problems.

$
0
0
Hi Yincy :)
Thanks, but I don't understand, would you please elaborate. :oops:

Do you mean using a conditional formula? Would that even work?
Your code logic is what's wrong here, not the Clamp() function. How do you expect to have 0 to 255 results if in the 2nd bang you keep adding (and subtracting, in the other mouse scroll action) 5 to the correctly clamped value from the 1st bang?

Code:

MouseScrollUpAction=[!SetVariable #CURRENTSECTION# (Clamp([#[#CURRENTSECTION]],0,255))][!SetVariable #CURRENTSECTION# ([#[#CURRENTSECTION]]+5)]
To do what you said you wanted to do, you should probably get rid of the 1st bang and apply the Clamp() to the sum (or difference, in the other mouse scroll action) from the 2nd bang. If I understood your intention correctly, that is.
Or do I just move the clamped part after the increase/decrease bangs?

Statistics: Posted by sl23 — Yesterday, 6:40 pm



Viewing all articles
Browse latest Browse all 1587

Trending Articles