Triggering scripts to send MIDI / OSC - FROM Bitwig

I have a button with a script in it. If I trigger the button with mouse it works fine -

  1. Color changes
  2. Sends MIDI
  3. Sends OSC message

But if I 'activate' the button via OSC from Bitwig I just get:

  1. Color changes.

Am I doing something wrong or is this the expected behaviour?
If it's expected, is there another way to achieve this?

Video demo: Loom | Free Screen & Video Recording Software

Thanks!

send() does nothing when the event that triggered the script is not a user interaction (see Scripting - Open Stage Control). If you want O-S-C to send replies to incoming messages you need to write a custom moule (see example).

Got it, thanks Jean-Emmanuel.