Troubleshooting
New User Menu scripting woes
Started by nbdy on .
Sign in or create an account to join the conversation.
Hello All,
I'm a new user and struggling with the Menu item. I have downloaded
and looked at quite a few projects searching for an example.
Have also read thru the pertinent parts of the manual.
My question is...
I have a simple menu with 2 items.
I want to send a different OSC command on selection of
each one of those 2 choices.
Thanks,
nbdy
I'm a new user and struggling with the Menu item. I have downloaded
and looked at quite a few projects searching for an example.
Have also read thru the pertinent parts of the manual.
My question is...
I have a simple menu with 2 items.
I want to send a different OSC command on selection of
each one of those 2 choices.
Thanks,
nbdy
you need to create a script that executes "on expression" selection.
selection is where the menu object stores your choice. 0 = first choice, 1 = second, etc.
so something like:
if (selection == 0) {
// do these things
} else if (selection == 1) {
// do these other things
}
selection is where the menu object stores your choice. 0 = first choice, 1 = second, etc.
so something like:
if (selection == 0) {
// do these things
} else if (selection == 1) {
// do these other things
}
Thanks oldgearguy
Thought I had this figured out but perhaps my syntax is incorrect.
The script is still all in red.
my script...
Execution: On Expression, selection
if (selection==0){
oscout (0,'/Server/showcontrol/fadein/')
} else if (selection == 1){
oscout (0,'/server/showcontrol/fadeout/')
}
What am I doing wrong?
Any help would be appreciated
nbdy
The script is still all in red.
my script...
Execution: On Expression, selection
if (selection==0){
oscout (0,'/Server/showcontrol/fadein/')
} else if (selection == 1){
oscout (0,'/server/showcontrol/fadeout/')
}
What am I doing wrong?
Any help would be appreciated
nbdy
oscout needs three inputs, target, address, and args[]. You forgot the args[].
ya know Phill999 as I have been reading on the forums and the manual I have seen ARGS[]
what would my ARGS be in this case?
the OSC commands to make this work are as stated in the scout lines of my script.
in my project I have 2 separate CustomButtons that do what I am trying with the menu.
those buttons just send the osc commands
/Server/showcontrol/fadein/
/Server/showcontrol/fadeout/
I'm missing something here.
Thanks,
nbdy
what would my ARGS be in this case?
the OSC commands to make this work are as stated in the scout lines of my script.
in my project I have 2 separate CustomButtons that do what I am trying with the menu.
those buttons just send the osc commands
/Server/showcontrol/fadein/
/Server/showcontrol/fadeout/
I'm missing something here.
Thanks,
nbdy
I would try with values 0 and 1. That could work for a switch. But we cannot know, it depends on the receiving application.