Project

General

Profile

$menuicon » History » Revision 6

Revision 5 (Per Amundsen, 02/23/2023 05:00 PM) → Revision 6/7 (Per Amundsen, 02/23/2023 05:03 PM)

_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._ 

 *Parameters* 

 table(ktable). 
 |*Parameter*|*Description*| 
 | filename | Path to the icon/image file. | 
 | [index] | The Nth icon in a .exe/.dll file. (optional) | 


 *Example* 

 <pre> 
 ; 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 
 } 
 </pre>