Slider keeps rounding my values down

I have some sliders with all four parameters set: lower bound, default, upper bound, increment.

But the slider keeps rounding the returned values down, even though my defaults lie on the specified increments. 1.6 becomes 1, and 120 becomes 100.

What am I doing wrong here?


Slider Issue.kmmacros (4.4 KB)

The first one is because Keyboard Maestro only allows integer results in the slider. I will remove that limitation for the next version.

The second one is because I set the values in the slide in the order in the array, min value, initial value, max value, but the slider starts with a minimum and maximum value of 0, 100, so an initial value of 120, when I set it, is outside the range and clipped to 100. This is also fixed for the next version.

So for now, to stay within the limitations of the slider:

  • Ensure the initial value is between the minimum value you set and 100.
  • Ensure the result you expect is an integer.

Thanks! Now that I understand, I can make both work with a little algebra.

1 Like