Project

General

Profile

$menuicon » History » Version 6

Per Amundsen, 02/23/2023 05:03 PM

1 1 Per Amundsen
_Added in 2.7_
2
3 4 Per Amundsen
*$menuicon(filename,[index])*
4 1 Per Amundsen
5
Adds a icon to a [[Scripting Menus|menu item]].
6
7 3 Per Amundsen
_Since ":" characters are not allowed in the menu text, [[$chr|$chr(58)]] can be used if a X:\ path is used._
8 2 Per Amundsen
9 1 Per Amundsen
*Parameters*
10
11 5 Per Amundsen
table(ktable).
12
|*Parameter*|*Description*|
13
| filename | Path to the icon/image file. |
14
| [index] | The Nth icon in a .exe/.dll file. (optional) |
15 6 Per Amundsen
16
17
*Example*
18
19
<pre>
20
; Create a custom window.
21
/window @window
22
23
; Add a menu for the custom window with a menu icon,
24
; Notice the use of $+ $chr(58) $+ to make a ":" character, since they are not allowed in the menu text.
25
menu @window {
26
  $menuicon(c $+ $chr(58) $+ \path\to\image.jpg) This menu has a icon:echo -ag hello world
27
}
28
</pre>