Please enable JavaScript to view this site.

A-Shell Reference

mnutxt (String) specifies the text that will appear in the menu item, and optionally, a bitmap or icon to display alongside the text. You may precede one letter with "&" to allow that letter to be used with the Alt key as a hot key for the menu. For example, "&Custom" would display as "Custom" and could be selected via Alt+C. You may append a right-justified suffix to the text by preceding it with a TAB character, i.e. chr(9). For example:

MnuTxt = "Calculator" + chr(9) + "F6"

ashref_img163

mnutxt may also serve as the identifier for the menu item, allowing it to be selected for later deletion, so it should be a unique string.

To include a bitmap or icon alongside the menu text, precede the text with the bitmap or icon specification enclosed in vertical bars. You may also specify a desired size in pixels by appending "=##" to the end of the image spec, where ## is a number between 10 and 99. (The images are assumed to be square. If no size is specified, for standalone BMP files, the actual size of the bitmap will be used; for icons, the size will be set to 16x16, which is the standard size of a menu icon). Best results will be obtained when the actual image size (or, in the case of icons, when one of the available images) matches the target size.

The image specification can be in any of the formats accepted for standard Icon Control or Bitmap Control (AMOS-style or native fspec, and/or in the case of icons, a resourcename::dllname). In the case of ATE, the image file must be present on the ATE client; if not present in the specified location, ATE will also look in the %ATECACHE% and %ATEPERMCACHE% directories. A typical strategy is to copy all of the images needed by ATE into the %ATEPERMCACHE% directory, possibly using the ATSYNC.LIT utility. Some examples:

mnutxt = "|images:fopen.bmp|Open File"

mnutxt = "|help.ico[7,57]=64|Help"

mnutxt = "|%MIAME%\images\exit.ico=32|Exit"

mnutxt = "|paste::ashico1v|Paste"

See Menu Icons for more details and examples of menus with images.

When modifying or deleting custom menu items, you must identify the item by setting mnutxt to the text used when the menu was created. Using the ordinal position may work for modifications, but will fail to fully delete the item, making it impossible to re-add it later. Menuid should identify the parent menu. See Adding/Deleting Internal Menu Items for details on dealing with the built-in menu items.

History

2013 May, A-Shell 6.1.1351:  Icon images can now be attached to context menu items, just as they can for normal menu items, using the same "|image|text" syntax.

2013 May, A-Shell 6.1.1351: "\t" can now be embedded directly in mnutxt to signify a TAB, as an alternative to concatenating a chr(9) as described above. This is particularly convenient when menu item text is stored in a data file rather than assembled dynamically. For example, the menu items in the sample context menu above can now be created with the following:

"Edit MIAME.INI \t F5"

"Calculator \t F6"

 

2009 July, A-Shell 5.1.1155:  You can also reference built-in menu items by setting mnutxt to the string representation of the item’s internal command ID (in the range of 100-199); see the Internal Menu Modifiers table, above.

2009 July, A-Shell 5.1.1154:  You can specify a bitmap or icon to display next to the menu item; see Menu Icons.