3 state button
Need:
- item type = Level, name = Item 1
- item type = Button, name = Item 2
- script
1. For Item 1, create 3 states and changes property:
Feedback = Channel
Min: 0
Max: 2
2. Item 2, for all state change property color alpha channel = 0;
3. open script editor (JS button)
4. create script
IR.AddListener(IR.EVENT_ITEM_RELEASE, IR.GetItem("Page 1").GetItem("Item 2"), function(){
var item = IR.GetItem("Page 1").GetItem("Item 1");
item.Value = (item.Value + 1) % 3;
switch( item.Value )
{
case 0:
// Commands
break;
case 1:
// Commands
break;
case 2:
// Commands
break;
}
});
3State_Buttons_2.irpz
Customer support service by UserEcho