scripting a menubar into existence in max 5

Peter Nyboer's icon

I have a menubar that I script into existence in max 4, but I'm not sure how do this in 5. In 4, I have messages that I create and bang that setup the menubar. These are of the format for "sending messges to max", and basically create the script for menubar:

;#N menubar 9
;#X apple About My Program
;#X open 2
;#X saveas 4
;#X newitem 1
;#X closeitem
;#X file 15 Quit /Q
;#X menutitle 5 Configure
;#X item 5 1 Config1
;#X item 5 2 Config2
;#X menutitle 6 Options
;#X item 6 1 Option1
;#X item 6 2 Option2
;#X menutitle 7 More
;#X item 7 1 More1
;#X menutitle 8 Help
;#X item 8 1 Help
;#X end

once that is done, I can send this to thispatcher:

script new menu newobj 100 295 250 196617 menubar 8 7

This doesn't work in Max5. So the question is, how do generate a script for the menubar in Max 5? I need to do this, because the contents of the menubar depend on some things at startup.

Thanks,

Pete.

Luke Hall's icon

Have you checked the [menubar] helpfile?

lh

Peter Nyboer's icon

Yes. And there doesn't seem to be any way to add items to the menubar from Max. It seems to only support menu creation from the script entered into the script window. I need to add items based on conditions that are only known once the patch is open.

johannotto's icon

... I am also interested to know how that is possible...

johannotto's icon

... oh no... I wanted to know if it's possible to add a menu to the standard-max-menu?

Peter Nyboer's icon

you can, using the scripts in the menubar object (see my patch above which adds a couple menus), but you can't seem to do it programmatically from Max.