Switch Button OSC Address

New To OSC - Sorry.
I am using OSC to trigger QLAB.
Works fine with a toggle button…
eg OSC Address = /cue/cuename/start

How do you set OSC address for a switch??
eg If option 1 is selected start cue 1. / option 2 - cue 2 etc

Hi, I think this thread covers it: Two or more osc address on a toggle button

Thanks jean-emmanuel

Not quite what I was looking for, let me explain further.

Normally I use a button widget to trigger a cue in QLAB.
For example in QLAB I have a cue called “AudioFX”
In OSC I set the widgets OSC Address to be…

On this occasion I want to use a switch widget to trigger one of three cues in QLAB.
Eg I have three cues called Audio1, Audio2, Audio3.
In OSC I have built a three way switch.
How do I define the OSC so that…
If the user selects option1 on the switch widget it triggers Audio1
If the user selects option2 on the switch widget it triggers Audio2

Thanks For The Info
Stupid Question - Where Do I Write A Custom Module??

OK - So I’ve created a .js file as below.
On opening OSC I’ve set the GUI to load the .js file
I’m not seeing any conversion of the OSC Message
Where am I going wrong

module.exports = {

oscOutFilter: function(data) {

var {address, args, host, port} = data

if (address == '/cue/Switch/start 1') {

  send(host, port, '/cue/Switch3/start', ...args)


return data



You are mixing up the osc address and arguments in your condition, instead of

if (address == '/cue/Switch/start 1') {

you should write

if (address == '/cue/Switch/start' && args[0].value == 1) {