Marxon Posted September 2, 2015 Report Share Posted September 2, 2015 Hi TK, would you please add also a "OffOnly" mode for buttons? A way to start a ngr on button press and a other script on release would be just as helpfull. Thank you very much! Best regards Marxon Quote Link to comment Share on other sites More sharing options...
novski Posted September 2, 2015 Report Share Posted September 2, 2015 Hello Marxoni hope i undersand your question right...try this as OFF in .NGCEVENT_BUTTON id= 1 type=CC chn= 1 cc= 16 range= 127:0and this as ONEVENT_BUTTON id= 1 type=CC chn= 1 cc= 16 range= 0:127and to jump to .NGR section type this in .NGC: EVENT_BUTTON id=1 type=Meta meta=RunSection:21 button_mode=OnOnlyand make the corresponding section in .NGRif ^section == 21 endif i didn't test that, let me know if it helped...Best Regards, Novski Quote Link to comment Share on other sites More sharing options...
Marxon Posted September 2, 2015 Author Report Share Posted September 2, 2015 (edited) Hi Novski,thanks for your suggestion!Your inverted range get me on the right path.Last night I did not come up with the idea.This is working: ### BUTTON PRESS EVENT_BUTTON id=1 hw_id=3 type=Meta range=127:0 button_mode=OnOff meta=runsection:1 ### BUTTON RELEASE EVENT_BUTTON id=2 hw_id=3 type=Meta range=0:127 button_mode=OnOnly meta=runsection:2It allows to run two different scripts on button press and button release.Until now i used a if/then statement in my .NGR script wich was probably not very CPU friendly.### .NGC EVENT_BUTTON id=1 hw_id=1 type=Meta range=0:127 button_mode=OnOff meta=runsection:1 ### .NGR if ^section == 1 if (id)button:1 == 0 LOG "BUTTON RELEASE" else LOG "BUTTON PRESS" endif endif Best regardsMarxon Edited September 2, 2015 by Marxon Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.