volume up/down

kfahmykfahmy Junior MemberPosts: 5
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 Junior Member 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 Junior Member Posts: 142
    Or much easier would be in this case to change the 'PULSE' statement to 'TO'...
  • kfahmykfahmy Junior Member Posts: 5
    Thanks for your support
Sign In or Register to comment.