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
New User Menu scripting woes
-
- Regular
- Posts: 315
- Joined: 02 Nov 2013 11:19
Re: New User Menu scripting woes
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
}
Re: New User Menu scripting woes
Thanks oldgearguy
Re: New User Menu scripting woes
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
Re: New User Menu scripting woes
oscout needs three inputs, target, address, and args[]. You forgot the args[].
Formant+Eurorack, PPG wave 2.2, Korg MS-20, etc., EWI 4000s, QuNeo, etc., Mixbus32c, u-he, MadronaLabs, Samplemodeling, NI, etc., iPad2/4/Pro
Re: New User Menu scripting woes
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
Re: New User Menu scripting woes
I would try with values 0 and 1. That could work for a switch. But we cannot know, it depends on the receiving application.
Formant+Eurorack, PPG wave 2.2, Korg MS-20, etc., EWI 4000s, QuNeo, etc., Mixbus32c, u-he, MadronaLabs, Samplemodeling, NI, etc., iPad2/4/Pro