View Single Post
Old 01-29-2018, 12:22 PM   #4
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Posts: 2,729
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 | Stephan Römer - film composer
If you wish to donate for my scripts: please consider an organization like: animal shelter, doctors without borders, UNICEF, etc...
_Stevie_ is online now   Reply With Quote