script to display (unfold) the items of umenu

prko's icon

Dear users,

can we unfold (display) the items of a umenu without clicking the umenu?
I have tried to find a script.
I cannot find anything....

best,
prko

Luke Hall's icon

Like this?

Max Patch
Copy patch and select New From Clipboard in Max.

lh

prko's icon

Thanks.
I mean, however, the umenu itself should unfolded without mouse click.
In your patch, we see the items as a message and umenu is not expanded.

Luke Hall's icon

Oh right, now I see. I'm afraid the answer is "no". This isn't possible at the moment but you can step through the items with the "prev" and "next" messages. What are you trying to do?

lh

jvkr's icon

Like you see on websites sometimes, hovering with the mouse will unfold it (which creates a horrendously nervous user interface when no delay is used). You could give it a try with the lcd object. All tools are there: writing, mouse tracking, changing size.

_
johan

prko's icon

thanks a lot.
I have given up this idea.
lcd object can not expand the umenu.

best,
prko

Luke Hall's icon

You are right: [lcd] cannot expand [umenu] but I think what Johan meant was that you could code your own [umenu] replacement with [lcd] that does exactly what you want. The [jsui] object would be another option.

lh

stoplaughing's icon

I'm not sure this helps,but Martin Ritters LoadMedia patch has a umenu that loads into jit.cellblock which is basically an 'unfolded' umenu. Here's his patch so you can see if his idea is helpful

Max Patch
Copy patch and select New From Clipboard in Max.

jvkr's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Something like this is what I had in mind:

_
johan

stoplaughing's icon
stoplaughing's icon

Why won't this work.. ?

Max Patch
Copy patch and select New From Clipboard in Max.

stoplaughing's icon

it only took me 15 minutes to realize I'm an idiot

Luke Hall's icon

Search the forum for the "autobot" [mxj] class and you can use [sel] to send it the "mouseclick 1" message when your mouse [hover]s over a [umenu] with a certain scripting name.

Max Patch
Copy patch and select New From Clipboard in Max.

lh

stoplaughing's icon

i couldnt find the mxj autobot.. aka.mouse works fine

Max Patch
Copy patch and select New From Clipboard in Max.

seejayjames's icon

the java "robot" class will work cross-platform though.

also there is the

;max pupdate $1 $2

message which will move your mouse wherever. add the robot class and you can auto-click anywhere you want, including the Shut Down command for your computer...or someone else's if you get into networking. evil and fun!

prko's icon

to Luke Hall

I have not understood the comment in your patch:

<< replace this with the real autobot mxj

What does it mean?

prko's icon

to stoplaughing

it is fine.
Thanks!

Luke Hall's icon

The [mxj autobot] java class is not included in the standard max distribution but you should be able to find it on the forum, I recently linked to the code for someone as attachments have been broken.

lh

manmusic's icon

Hello Luca Hall. I am very interested in your first patch that I am trying to implement in my project. The "umenu" I would like to observe is a set of audio files. I would like to use "count" to obtain only the file names and not the entire paths. Do you have any ideas for this?

observeItemUmenu.json
application/json 16.08 KB

11OLSEN's icon

@manmusic If you have your populated menu and reset the prefix to nothing, it will only output filenames without the path. For example, using the 3rd outlet in response to a "dump" message. For the OP, you should check 11UILayer, which makes sending a click to a umenu a trivial task..

manmusic's icon

I'm not sure I fully understand. My intention is to use my two Umenu(s) to create the hierarchy of submenus and files within a more general Bpatcher.

folderFiles.json
application/json 30.66 KB

However, I'd also like to retrieve the list of file names within this Bpatcher to send it via OSC to Open Stage Control. I don't see any other way to do it.

observeItemUmenu.json
application/json 16.42 KB

Source Audio's icon

read umenu helpfile, check prefix_mode.
if you don't want to set umenu to output mode - ignore,
insert strippath to output only file names.

-------
check also chooser object.
if one sets it properly, it populates similar to umenu,
can be hidden or shown to mimic expanded umenu.

*** paste patches as compressed copy next time

manmusic's icon

Thank you very much, Source Audio. It's exactly what I was looking for. I should spend a bit more time on using umenu. I've often used this object as a simple GUI, but I'm discovering it has many other talents!