How to make unmenu only send message on bang?

exOct's icon

I have an unmemnu that is used for reading certain files that are related to a numeric value, that is also used for something else in the patch.
What I would like to do is to be able to change this value and switch the unmenu to corresponding file, but not read the file. I would only like to send the message from unmenu / read the file when I send it a separate bang.
Right now in the instant that the value is changed, unmenu switches to corresponding value and sends the message to read the file.

Maybe I could use so kind of momentary gate, that is only opened when banged, to block the message from unmenu and than later at the same moment bang unmenu to send the message and this temporary gate to let the message through. But I can't find any object that would do this, and can't figure out any way to do it.
Maybe I have to do this in a totally different way?

Hope my description makes sense and that someone can help.

Jernej

gusanomaxlist's icon

hi,

maybe you can store the data out of [umenu] instead, and then get it back / send it later with your bang ?

(hint: have a look at [zl] object )

ciao
_y

seejayjames's icon

yes, [zl reg] or a message box will store it temporarily. You can also simply show the umenu value with set $1, rather than $1 which switches it and sends it out, then after setting, send a bang which will send it out.

For your thought about momentary gates, that might be useful elsewhere, but shouldn't be needed here. If you do need it at some point, be sure to read up on [trigger], probably the most useful Max object around...

exOct's icon

Thanks, set $1 did the trick. I somehow missed this in help.