Home AMX User Forum AMX Technical Discussion

volume up/down

i have have to control a LED TV volume up/down using the code below

BUTTON_EVENT [ dvTP_CD,BUTTON.INPUT.CHANNEL]

{
PUSH:
{
PULSE[dv_CD,BUTTON.INPUT.CHANNEL]
}
}

but the increase in volume increased step by step as i press on button, i want to increase the volume as long as the button is pressed

any idea????

Comments

  • tdewildtdewild Posts: 49
    Use the HOLD event handler.

    From the help file:

    A HOLD event handler specifies the actions that should be performed when a button is pressed and held for a minimum length of time indicated by the TIME parameter (specified in 0.1 second increments).

    The REPEAT keyword is used to specify that the event notification should be repeated in TIME increments as long as the button is held.

    Example:

    BUTTON_EVENT[DEVICE,CHANNEL]
    {
    PUSH:
    {
    // PUSH event handler
    }
    RELEASE:
    {
    // RELEASE event handler
    }
    HOLD[TIME]: or HOLD[TIME, REPEAT]:
    {
    // HOLD event handler
    }
    }
  • Dries KaspersDries Kaspers Posts: 142
    Or much easier would be in this case to change the 'PULSE' statement to 'TO'...
  • kfahmykfahmy Posts: 5
    Thanks for your support
Sign In or Register to comment.