Buttons able to toggle through a set of macros

At the moment a button can toggle through individual commands.

It would be really useful to be able to toggle through macros.
In other words, each press of the button would run through a series of commands instead of just one command.

David
8 people like
this idea
+1
Reply
  • 1
    Yes, especially now with variables that would be great!
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned sad, anxious, confused, frustrated happy, confident, thankful, excited

  • Yes, that would be great.

    That way you could make a button that toggles between, let's say, different surround modes and at the same time changes the text or look from the button.
    That way you always have a good representation of what mode it's on :)
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned sad, anxious, confused, frustrated happy, confident, thankful, excited

  • I’m hopeful
    I too would like the option to toggle between macros. For instance, I would like to have a multi-state button where the first macro would turn on my system and select the appropriate source. The button would then change to a pressed state. The second macro would be to turn off my system. The button would then change back to a default state. It would allow me to have a single on/off button for each desired source.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned sad, anxious, confused, frustrated happy, confident, thankful, excited

  • Pieter,

    Depending on your setup you could accomplish the same thing without this. If you setup feedback on the receiver to show the listening mode, you can use a Surround mode toggle button. When you change modes that would also change the feedback.

    JamMaster,

    This is a workaround but it would accomplish what you are asking for. Create two buttons in builder with your different macros and images. Create two variables, one variable would move the button not in use off of the screen and the second variable would be within the entrance to move the unused button off the page before the page is loaded. Each button would require a variable that sets the opposite button to move off the screen, and also move the new button in place of the old.

    Scott
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned sad, anxious, confused, frustrated happy, confident, thankful, excited

  • 1
    That would work, but would become incredibly cumbersome if you have many toggle buttons on one page. Trying to keep track of rows and columns numbers of 20 buttons (plus each button's alter ego) just sounds like a nightmare. Any chance we get this macro functionality any time soon?

    Seems like you could simply create a new command type called 'toggle,' then just place that between any set of commands. That way you can still use 'delays' in your macros. You don't even need a button property for toggle (yes/no)...if it has this new toggle command, iRule toggles the set of commands on either side of it.

    You could even allow more than two sets of commands. Two 'toggle' commands would split up three macros, and you just cycle through them. You could toggle as many macros as you wanted. Ultimate flexibility!
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned sad, anxious, confused, frustrated happy, confident, thankful, excited

  • You can use conditionals to change the macros being used on a single button.

    If you set a variable on the first button press, or with another button, you can change the set of commands that are executed by processing the state of the macro. I setup a sleep button using an input variable. Depending on the amount I want the timer a different macro is executed

  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned sad, anxious, confused, frustrated happy, confident, thankful, excited

  • My scenario is that I have a play/pause button. If I pause I want lights to come up (Lutron) when I play I want them to go back down.

    I'm controlling two devices here (DirecTV and Lutron) both with discrete commands but I need to be able to toggle between them. Any ideas on this one?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned sad, anxious, confused, frustrated happy, confident, thankful, excited

  • You could setup a variable to keep track of the last operation, and alternate between play and pause. Something like this, programmed on the play/pause button:

    IF $LastOp$ = Play
    Command execute PAUSE on Directv
    Command execute LIGHTSUP on Lutron
    Set Variable $LastOp$ = Pause

    ELSEIF $LastOp$ = Pause
    Command execute PLAY on Directv
    Command execute LIGHTSDOWN on Lutron
    Set Variable $LastOp$ = Play

    ELSEIF $LastOp$ != Play
    AND $LastOp$ != Pause
    Command execute PLAY on Directv
    Command execute LIGHTSDOWN on Lutron
    Set Variable $LastOp$ = Play

    ENDIF

    The last ELSEIF is the catchall or startup branch. If $LaastOp$ does not equal one of its two defined values (Play or Pause), then this branch is executed. In my version, it executes the commands from the IF $LastOp$ = Pause branch. It could just as easily execute the commands from the IF $LastOp$ = Play branch. It could also just set the value of $LastOp$ to Play or Pause, whichever you prefer. Then the next button press would excute the corresponding branch.

    You could also set the variable in the Entrance to the page, but what if you leave the page and come back to it? The variable may "re-initialize" to the wrong state.

    Another variation would be the following:

    IF $LastOp$ = Play
    Command execute PAUSE on Directv
    Command execute LIGHTSUP on Lutron
    Set Variable $LastOp$ = Pause

    ELSE
    Command execute PLAY on Directv
    Command execute LIGHTSDOWN on Lutron
    Set Variable $LastOp$ = PLAY

    ENDIF

    The key here is that the ELSEIF is replaced with an ELSE. So, if $LastOp$ is equal to "Play", the first branch is executed. If $LastOp$ is equal to anything else, including undefined, then the second branch is executed. You would put the default, or the first set of commands you wanted to execute, in the ELSE branch, and adjust the IF statement accordingly.

    Of course, the simplest option would be to just have 2 buttons, a Play button and a Pause button. Each button would have 1 command to Directv and 1 command to Lutron, and that's it.

    Good luck!

    Mike
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned sad, anxious, confused, frustrated happy, confident, thankful, excited