View Single Post
Old 01-29-2018, 12:22 PM   #4
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

I'm pretty far already, but I somehow can't solve this problem.

My button action looks like this:

Code:
msg1 == 0x90 ? + msg2 == 0x2d + msg3 == 0x7F ? // if VST instrument button is pressed
(
     oscmatch("/fxinst/openui") + oscparm(0, f) == 0 ? // if VST instrument GUI is closed
     oscsend(osc_out, "b/fxinst/openui", 1) // open VST instrument GUI
);
This works perfectly for opening the GUI, however, now I need a second if condition, that will look for the oscparm(0, f) == 1. I tried several things, but I can't seem to get nested if conditions working. How can I write:
(pseudo code)
Code:
if button is pressed
   if /fxinst/openui and oscparm(0,f) == 0
      open VSTi GUI
   elseif /fxinst/openui and oscparm(0,f) == 1
      close VSTi GUI
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote