How do I send a different value depending on which buttons are pressed?

Hi, there folks!

New OSC user here. Absolutely love how powerful it is. Unfortunately, my coding ability is 0, and I'd love to start working on that!

I am trying to figure out how to have a menu with multiple togglable buttons and depending on which ones you select, a different CC is sent.

In a simpler example. I have two buttons as selectors which don't do anything unless the go button is pressed. If I toggle only Select_1, and then press go, it sends out one certain CC value to Cubase (say for example 5,1), and if I press only Select_2 and then press go, it sends another. (for example 5,2)

The biggest trouble I'm having is, how can I also toggle both of these two select buttons and when you press go, it sends CC 5, 3?

I hope I'm making sense. I'm still new to this world haha. I've given the documentation a read but I'm still pretty choppy on all of this.

Thanks a ton to anyone who is able to give this newbie a hand.

Hope everyone has an awesome day!

open-stage-control_rPu2vTNh0A

Using the "go" button's onValue script and assuming the select_* button's on and off properties are set to 1 and 0 and the go button's target property is set to something like midi:device_name:

var select_1 = get('select_1'),
    select_2 = get('select_2')

if (select_1 && !select_2) {
  // only select_1 is on
  send('/control', 1, 5, 1)
} else if (!select_1 && select_2) {
  // only select_2 is on 
  send('/control', 1, 5, 2)  
} else if (select_1 && select_2) {
  // select_1 and select_2 are on
  send('/control', 1, 5, 3)
}

Hi, Jean-Emmanuel!

This was explained very clearly and I very much appreciate the response.

Looking forward to implimenting it.

Cheers!!