How to use the number after the widget ID as a variable in the osc command?

  1. I want to put the number that follows the widget's ID as a variable in the OSC command that it passes.
    For example,
    Let's say the id of a widget of type button is button_1,
    '/source/obj/x' + {widget id number} + {value}
    with the following command
    I want the resulting value to be /source/obj/x 1 {value}.
    Is there a way to do this?
    Thanks

  2. I would like to pass the value of the osc being passed as an int32, is there a way to do this? Currently my module does not recognize the value because it is passed with a decimal point.

  1. That'd be using the preArgs property instead of the address (which should only contain the osc address), and you'll need some javascript to extract the number from the id (using advanced syntaxes). The following would do (assuming the number is always after an underscore):
#{ @{this.id}.split('_').pop() }
  1. Setting typeTags to i should do.