_Added in 2.7_ *$menuicon(filename,[index])* Adds a icon to a [[Scripting Menus|menu item]]. _Since ":" characters are not allowed in the menu text, [[$chr|$chr(58)]] can be used if a X:\ path is used._ _See also [[$menu]], [[$menutype]], [[$menucontext]], [[$mouse]], [[Scripting_Menus|Menus]]._ *Parameters* table(ktable). |*Parameter*|*Description*| | filename | Path to the icon/image file. | | [index] | The Nth icon in a .exe/.dll file. (optional) | *Example*
; Create a custom window.
/window @window

; Add a menu for the custom window with a menu icon,
; Notice the use of $+ $chr(58) $+ to make a ":" character, since they are not allowed in the menu text.
menu @window {
  $menuicon(c $+ $chr(58) $+ \path\to\image.jpg) This menu has a icon:echo -ag hello world
}