Scripting Not Executing

Hi,

Please help me to slove a panel Execute scripting problem. I entered the scripts following a tutorial. Everything is the same except I can’t run this right. Please see the attached file and help me to diagnose the problem. [project1/button1]

394 Simple VJ Setup.toe (7.2 KB)

Hi @angelfu29 - you have a few typos in your panel execute. First up, your changes need to go inside of your onOffToOn method. In your network, you have this:

def onOffToOn(panelValue):
	return

    s1 = op('../select1')
    s2 = op('../select2')...

Noitce that your variables are defined after that return statement - instead, your code needs to go between the colon and the return like below. Notice that you also have a missing quotes for null2 = op(../null2')['chan1'] it should be null2 = op('../null2')['chan1']. All in all, those changes should look like:

def onOffToOn(panelValue):


    s1 = op('../select1')
    s2 = op('../select2')
    trans = op('../constant1')
    null2 = op('../null2')['chan1']
    
    target = 'module' + str(me.parent().digits) + '/null1'
    
    if null2 == 0:
       s2.par.top = target
      
    else:
        s1.par.top = target
    
    return

One other note here - you’ll need to put this same panel execute in all of your buttons in order for this to work correctly.

Hope that helps.

Hi Raganmd,

I made the changes as you said, but it still gives me errors. I corrected those errors and copy the panel execute to every button. Please see attached updated file.

Thanks
Angel
394 Simple VJ Setup.version 2.toe (7.3 KB)

hi @angelfu29

Looks like you’re syntax is not totally right on the call to change parameters.

Your code looks like:
trans.par.value() = 1

The correct syntax here is:
trans.par.value0 = 1

Value isn’t a method you can call, instead you need to target the parameter value0 to change it.

Problem solved. Thanks a lot!

BTW…Are you Matthew Ragan? I am following your course on your website right now:)

That’s me - I think I just responded to your email to my contact link.