Home AMX User Forum AMX Design Tools

Changing Range High value of general button at run-time.

Does anyone know how to change the Range High value of a general button at run-time? I tried ^GLH but that only works for bargraphs.

Any help would be greatly appreciated.

Thanks.

Comments

  • I think you can do this with ^BMF
  • viningvining Posts: 4,368
    Joe Hebert wrote:
    Does anyone know how to change the Range High value of a general button at run-time?
    How do you even get a range on a general button and what would you do with it if you could?
  • Joe HebertJoe Hebert Posts: 2,159
    vining wrote: »
    How do you even get a range on a general button and what would you do with it if you could?
    What you see as the attachment in the first post is that of a general button with a range. What that button does is decrement (Level Control Type Relative and Level Control Value -1) any bargraph (in my case a multi-state bargraph) with a level code of 1 and a level port of 14 without any need for code. I also have another button with a Level Control of 1 which will increment level 1 of port 14 by 1 without any need for code. The speed of the ramping is adjusted with the Level Control Repeat value.

    The bargraph has a fixed amount of states and as the program runs the images for each state changes (^BMP) along with the upper limit of the bargraph (^GLH). When I change the upper limit of the bargraph I also need to change the high range of the general buttons so ramping stays in sync but I can?t find a command to do that. None of the embedded codes for ^BMF apply. There seems to be a command to change just about anything except for the low and high ranges of a general button.

    So anyway I?ve abandoned the idea of changing the high range at run-time since I don?t think I can and instead effectively clamp the high range by trapping for the level event in code and do a SEND_LEVEL max if max is exceeded. It?s not exactly the way I wanted to do it but it?s working perfectly fine so I?m happy.
  • viningvining Posts: 4,368
    Well it took a while but now I see that you changed the level control type from none to relative which then gives you the extra fields. I"ve never been there with a general button so I didn't know it was possible. Now I just got to figure out what uses it might have.

    Does that send levels back to the master? If so how does it do the incrementing or decrementing w/o knowing the current level value? I've never seen a way to adjust levels in code with a relative feature that allows you to increment or decrement so it doesn't seem like the TP should be able to but you obviously have that part working. Hmmm..
  • Joe HebertJoe Hebert Posts: 2,159
    vining wrote:
    Well it took a while but now I see that you changed the level control type from none to relative which then gives you the extra fields
    You can also select absolute level control type and when the button is pressed the level is set to the Level Control Value. When you select absolute level control type then the level control repeat value is no longer an option since repeating only makes sense when ramping relatively.
    vining wrote:
    Does that send levels back to the master?
    Yup.
    vining wrote:
    If so how does it do the incrementing or decrementing w/o knowing the current level value? I've never seen a way to adjust levels in code with a relative feature that allows you to increment or decrement so it doesn't seem like the TP should be able to but you obviously have that part working. Hmmm..
    I don?t know how it does it but it does do it. It?s magically delicious?.
  • mushmush Posts: 287
    G'day Joe,

    I tried to use this feature and ran into the same wall as you.
    After much fiddling about a phone call to tech support revealed that it does not work on buttons and is not meant to!
    I asked if it could be implemented, maybe if you asked too it would add more weight?

    Cheers

    Mush
  • Joe HebertJoe Hebert Posts: 2,159
    mush wrote: »
    maybe if you asked too it would add more weight?
    The only added weight I carry is around my midsection since I quit smoking a few months ago.
  • ColzieColzie Posts: 470
    Joe Hebert wrote: »
    The only added weight I carry is around my midsection since I quit smoking a few months ago.

    Congratulations!

    ...about not smoking. :)
  • ^ What he said. Congrats!

    --John
  • Joe HebertJoe Hebert Posts: 2,159
    Thanks guys. :)
Sign In or Register to comment.