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
  Trigger on Russound F1 button xlurkr 6 1,014 06-01-2020, 01:17 PM
Last Post: Dean Roddey
  How to copy/paste command button on template Deane Johnson 1 445 04-17-2020, 02:18 PM
Last Post: Dean Roddey
  Button Generator gReatAutomation 0 519 02-28-2020, 01:33 PM
Last Post: gReatAutomation
  Timed Field Change in Lutron HW8 avtexan 11 4,736 08-06-2018, 11:17 AM
Last Post: Dean Roddey
  ELK V2 Driver - AreaArm field & Triggers? sic0048 4 3,346 08-19-2017, 04:46 PM
Last Post: Dean Roddey
  Video Widget znelbok 67 33,760 04-12-2017, 04:08 PM
Last Post: Dean Roddey
  An idea for a new widget Dean Roddey 5 3,636 03-13-2017, 02:47 PM
Last Post: potts.mike
  Web browser widget Trioxide 7 4,609 02-25-2017, 06:30 AM
Last Post: Trioxide
  How to pass a variable into a field moniker EST 3 2,174 08-30-2016, 11:01 AM
Last Post: EST
  EventGhost alternatives to getting driver/field *TO* SmartPhone? IVB 37 12,348 08-13-2016, 07:32 PM
Last Post: IVB

Forum Jump:

Users browsing this thread: 1 Guest(s)