Added in 2.7

$menuicon(filename,[index])

Adds a icon to a menu item.

Since ":" characters are not allowed in the menu text, $chr(58) can be used if a X:\ path is used.

See also $menu, $menutype, $menucontext, $mouse, Menus.

Parameters

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
}