Button to zero out another widget WITHOUT sending a message?

Hi folks,

Until now i’ve been asking baby questions, but i believe this might be the first request that’s a little more tricky (but i hope not!)

What i need is this:

Imagine i have an XY pad and a button. The button needs to zero out the XY pad (place the dot right in the middle of the pad). No problem, i know how to do that.

But the tricky part is: as it does that action, i want the XY pad to be muted or bypassed. So as it jumps to the new position, it shouldn’t send out any message. And after it’s jumped to it’s new position, it unmutes itself and becomes active once again.

Is that in any way possible?

Use the last optional argument in set():

set("xy_1", [0, 0], {send: false})
1 Like

Thanks man!

Is it also possible to do the same trick with a tab? I mean, i have an XY pad in a tab, and every time i click on that tab, I want to see the XY pad zero’d out to it’s default.

I just tried doing the trick you described above and it seems to work with a button, but not with a click on tab.

It's the tab's parent that updates when you select a tab, you have to use the parent's script.

EDIT, my follow-up question was: how do you create multiple arguments in the panel > value > script field.

The answer is, put () around each argument.

So using J-E’s example, to zero out two different XY pads under two different tabs you need to do:

(set(“xy_1”, [0, 0], {send: false}))(set(“xy_2”, [0, 0], {send: false}))

in the panel > value > script field

Adding a new line (shift+enter) between the two statements would be more JS-ish:

set("xy_1", [0, 0], {send: false})
set("xy_2", [0, 0], {send: false})

A semi-colon is fine too

set("xy_1", [0, 0], {send: false}); set("xy_2", [0, 0], {send: false})