Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Field Incr/Decr Button Widget
Just a thought, haven't looked myself. Is there a min/max function such that you could do something like set(min(limit, new value)) and similar for decreases? I know the syntax is whack, but the concept is there.
Flamin' Noobie...
Warp speed now and don't give me any of that dilythium crystal crap!
There isn't anything like that currently, but it's fairly simple to do. Just something like:

If (System::LessThan(%(LVar:NewValue), minval))
    LocalVars::SetValue(LVar:NewValue, minval);

That will just clip it to the lowest value. And similarly the other way for clipping to the max.

There is a IsInNumericRange, which will check if a value is within a given range, but that's not exactly what you need.
Dean Roddey
Explorans limites defectum
I guess the innumericrange could be used as a single test for both up and down.
Flamin' Noobie...
Warp speed now and don't give me any of that dilythium crystal crap!
Earlier today I discovered LinkToField, and it is going to save me a LOT of time creating a thermostat popup (and many other location-aware things). The only issue is that with the loss of inc/dec functionality, I have to use a Command Button widget to change temperatures, and that widget (understandably) doesn't support LinkToField.

Does anyone know of a way to implement inc/dec and LinkToField at the same time?
Just save the moniker of the current thermo in a global variable. The actions can reference that moniker to create the target fields names, so something like:

Devices::WriteField(%(GVar:CurThermo).Mode, xxxx, True);

That sort of thing.
Dean Roddey
Explorans limites defectum
Oh wow - that's great! I already have the value in a GVar - that's how I'm passing context for the LinkToField settings.

The more I use actions, the more I appreciate what a nice job you did on dynamically building values. :-) At first I thought it was odd that you were saving actual text values for field and variable references, rather than some kind of internal ID. But now I understand. ;-)

Possibly Related Threads…
Thread Author Replies Views Last Post
  Error writing value to field Spot 6 1,628 05-28-2021, 03:22 PM
Last Post: Spot
  Trigger on Russound F1 button xlurkr 6 2,127 06-01-2020, 01:17 PM
Last Post: Dean Roddey
  How to copy/paste command button on template Deane Johnson 1 1,003 04-17-2020, 02:18 PM
Last Post: Dean Roddey
  Button Generator gReatAutomation 0 944 02-28-2020, 01:33 PM
Last Post: gReatAutomation
  Timed Field Change in Lutron HW8 avtexan 11 6,402 08-06-2018, 11:17 AM
Last Post: Dean Roddey
  ELK V2 Driver - AreaArm field & Triggers? sic0048 4 4,397 08-19-2017, 04:46 PM
Last Post: Dean Roddey
  Video Widget znelbok 67 41,028 04-12-2017, 04:08 PM
Last Post: Dean Roddey
  An idea for a new widget Dean Roddey 5 4,606 03-13-2017, 02:47 PM
Last Post: potts.mike
  Web browser widget Trioxide 7 5,843 02-25-2017, 06:30 AM
Last Post: Trioxide
  How to pass a variable into a field moniker EST 3 2,878 08-30-2016, 11:01 AM
Last Post: EST

Forum Jump:

Users browsing this thread: 2 Guest(s)