Toggle Button - Send Same /control with On and Off

Hi!
I would like to use Toggle buttons to send the same control message when toggling the button in it's "off" state. For example, when I press the toggle button ON, it will send /control midi channel 10 / cc 89, and then back OFF /control midi channel 10 / cc89. Essentially it would need to function like a push button but look like a toggle button. How can I achieve this? Is this possible without a custom module?

Yes it's possible without a custom module:

//Script property
//On Value
if (value === 0){ //When button's value is 0
  send("midi:my_device", "/control", 10, 89, 1)
}

if (value === 1){ //When button's value is 1
  send("midi:my_device", "/control", 10, 89, 1)
}

For what you are looking for I guess toggle mode would work (well any other mode really)

Note that in this case the script can be reduced to one line since you want the same thing to happen regardless of the value.

send("midi:my_device", "/control", 10, 89, 1)

Thanks to the both of you! Works great!