Hi. I'm newbie in scripting.
Because of some features of my midi-controller I would like to create a button in module which will turn on/turn off a checkbox.
First push - turn on.
Then release of the button make nothing.
Second push - turn off etc...
I created a button with massage OnOff and tried to use next script:
if msg == 'OnOff':
parameter = module.getValue ('NameOfCheckbox',0)
if parameter == 0 :
module.setValue ('NameOfCheckbox', 0,1)
else :
module.setValue ('NameOfCheckbox', 0,0)
But with this script when I push the button checkbox turns on
but when I release the button checkbox turns off.
Which code should I use?