You need to be logged in to post in the forums. If you do not have an account, please sign up first.
Menu.ini ITEM specification??
I'd like to customize some menus and dialogs. Finding the INI file and a bit about its structure is easy, but I haven't found a guide to the syntax for an item line. Is there such a guide, if not can someone summarize how an "item" is defined and what a menu.ini item line can (or should) contain?Thanks

Browser JS Changelogs Opera Next Dragonfly Bugs FTP
My Website Opera Review My Fonts IrfanView Search Downloads
Opera 11.64 on Windows 7 64-bit • AMD A10-6800K, 8 Gbyte RAM specs
Rules of Conduct and Posting Rules • Please Don't Shout • Editing Posts • Opera Config Links
Can someone point me to an actual guide to the syntax for an item line, or if there isn't one, can someone summarize how an "item" is defined and what a "menu.ini" item line can (or should) contain?
X is the name for the menu item and it can be text within double quotes or string number in language file.
See How to add/change icon for custom buttons or menu items?.
Item, 70464 = (X is a random number?)
Item, M_HOTCLICK_POPUP_MENU_GOTO_URL = (X is a token for some action?)
Item, Google Auto Translation = (X is unquoted text)
Item, "Spell check selected text" = (X is quoted text)
There also appear to be other kinds of item possible that aren't explained:
Include, Internal Frame ("include" entry)
Submenu, 200000, Reload Menu ("submenu" syntax)
I've added links to examples.
I guess there could also be other kinds of line that aren't in this list too.
22. April 2010, 15:01:12 (edited)
Originally posted by Stilezy:
It is string name. You can use either string name or string number.X is a token for some action?
Originally posted by Stilezy:
It will conflict if you have same item name.X is unquoted text
Originally posted by Stilezy:
This will include mentioned menu items in current menu."include" entry
Originally posted by Stilezy:
This will create submenu so you can click and view those menu items."submenu" syntax
Originally posted by Stilezy:
Item, 70464 = (X is a random number?)
Refers to a string in the language file.
Originally posted by Stilezy:
Item, M_HOTCLICK_POPUP_MENU_GOTO_URL = (X is a token for some action?)
Same as above, except you won't have to check what string the number is referring to.
Originally posted by Stilezy:
Item, Google Auto Translation = (X is unquoted text)
I guess the text is hardcoded or it may result in a conflict or something?
Originally posted by Stilezy:
Item, "Spell check selected text" = (X is quoted text)
You can just put whatever you want there and that's what'll show up.
Originally posted by Stilezy:
Include, Internal Frame ("include" entry)
That adds stuff where you put it from another menu.
Originally posted by Stilezy:
Submenu, 200000, Reload Menu ("submenu" syntax)
Roughly the same, except with a submenu.
But really, the quickest way is just to try and see what happens. If anything messes up, just revert the changes.
23. April 2010, 09:11:13 (edited)
1) The .lng language files contain the string numbers only. Where can I find a lookup table to convert between string names and string numbers?
2) What are the definitions of the different "%" variables? (%u %l %c %i %t etc, some are explained online, some I can't find)
3) An entry in menu.ini 10.5 has the line Item, MI_IDM_WWW_SUPPORT="Open URL in new page, "http://redir.opera.com/www.opera.com/support/",,,"Window Browser Icon"". I can't make sense of the quotation mark nesting on this line.
4) An example on Operawiki has the line "Item, 148440 = View hotlist, 0,,, Blank | View hotlist, 7,,, Blank". I can't find 148440 in the lng file. How does Opera identify the correct text string to display?
This is the kind of stuff that's needed for a guide. If anyone writes it up on Operawiki (hint!) can they link it here?
I have several entries to which I added icons and they worked in 10.51 (if I recall correctly), but they don't work now.
E.g. under [Speed Dial Thumbnail Popup Menu],
Item, "Reload" = Reload thumbnailworks, but
Item, "Reload" = Reload thumbnail,,,,"Reload"does not. Same for the rest of the entries under the same section.
Loyal Opera user saying NO to Opera 15.
Opera Mobile 16 & Opera Mobile 16 beta & Opera Mobile 12.1 & Opera Mini 7.5 on Samsung Galaxy Nexus
Opera Mobile 12 & Opera Mini 7 on Nokia E51
Originally posted by Stilezy:
2) What are the definitions of the different "%" variables? (%u %l %c %i %t etc, some are explained online, some I can't find)
http://operawiki.info/IniFileVariables
; "%c" (clipboard content)
; "%l" (address of a link you right-click)
; "%s" (filename of local source cache)
; "%t" (currently selected text)
; "%u" (current document URL)
Originally posted by Stilezy:
3) An entry in menu.ini 10.5 has the line Item, MI_IDM_WWW_SUPPORT="Open URL in new page, "http://redir.opera.com/www.opera.com/support/",,,"Window Browser Icon"". I can't make sense of the quotation mark nesting on this line.
Item, MI_IDM_WWW_SUPPORT="Open URL in new page, "http://redir.opera.com/www.opera.com/support/",,,"Window Browser Icon""
is same as
Item, MI_IDM_WWW_SUPPORT=Open URL in new page, "http://redir.opera.com/www.opera.com/support/",,,"Window Browser Icon"
Originally posted by Stilezy:
This is the kind of stuff that's needed for a guide. If anyone writes it up on Operawiki (hint!) can they link it here?
Syntax and commands @ http://operawiki.info/AllActions