Notifications
Clear all
[Closed] Menus in Max
Page 2 / 2
Prev
Jul 23, 2007 4:52 am
Hi Everybody.
Actually this Script working for me.But when i run this script first time its ok.When i change my menu name its not updating.and also how to add menu items here.i want to add 4 or 5 menu items.If anybody help with code greate for me.
if menuMan.registerMenuContext 0x6d2f869 then
(
– Get the main menu bar
local mainMenuBar = menuMan.getMainMenuBar()
-- Create a new menu
local subMenu = menuMan.createMenu "Gameshastra"
-- Create a menu item that calls the sample macroScript
local testItem = menuMan.createActionItem "Add Char" "Menu Test"
-- Add the item to the menu
subMenu.addItem testItem -1
-- Create a new menu item with the menu as it's sub-menu
local subMenuItem = menuMan.createSubMenuItem "Test Menu" subMenu
-- Compute the index of the next-to-last menu item in the main menu bar
local subMenuIndex = mainMenuBar.numItems() - 1
-- Add the sub-menu just at the second to last slot
mainMenuBar.addItem subMenuItem subMenuIndex
-- Redraw the menu bar with the new item
menuMan.updateMenuBar()
)
macroScript MyTest
category:“Menu Test”
tooltip:“Test Menu Item”
(
on execute do print “Hello World!”
)
Page 2 / 2
Prev