In addition to the standard methods for executing a menu item (double-clicking on it, highlighting it and pressing Enter, or using Alt the underlined letter), you may be able to define optional hotkeys for your menu items. (PopMenu hs this capability, FileMenu does not.) Hotkeys will cause an item to be executed immediately upon pressing the designated hot key. Hotkeys are defined by following the menu item with a backslash (\) and then the hotkey:
&Accessories &Notepad \ {F2} Run("notepad.exe", "") &Calculator \ ^C Run("calc.exe", "")
In the above example, the F2 key is defined as the hotkey for Notepad, and Ctrl-C is defined as the hotkey for Calculator. Most single keys and key combinations may be used as hotkeys, except for the F10 key, and except for Alt and Alt-Shift key combinations (although you may use Alt Ctrl key combinations). Refer to the SendKey function for a list of special keycodes which may also be used as hot keys. If you always access a menu item by using its hotkey, you may not need or want the menu item to appear in the pull-down menus. If so, you can make it a non-displayed menu item by placing an @ symbol in front of the title. For example:
&Accessories
In this case, Notepad would not appear in the pull-down menus, but could still be accessed by using the F2 hotkey. Note: Hotkeys and non-displayed menu items may not work in all implementations of the WIL Interpreter.
|
§ Step by step guide to learning WIL
|