ApplePie wrote:
It would be useful for the script to be able to tell that escape was pressed. For example, ErrorLevel could be set depending on whether the user selected an item or not.
I agree that it would be good, but from what I can tell, it would require a different menu mode of operation. This would require a redesign of certain complex parts of the program. Even so, it's something I'll try to keep in mind when the time comes to do more menu improvements, such as icons and multi-columns.
Quote:
b) When escape is pressed, the A_ThisMenuItem and A_ThisMenuItemPos variables are still set to the values left over from the previous menu item that was selected by the user. It could be safer it they were set to 'null' values such as 0 and "".
You're probably right, but I think it's best not to change it because of the likelihood of breaking existing scripts. In hindsight, certain aspects of the program like this one could have been done better.
Quote:
Currently, Menu, Delete fails if the menu doesn't exist, but I reckon it would be better if instead it just worked OK.
Try using
Menu, Tray, UseErrorLevel -- it prevents menu error dialogs and instead sets ErrorLevel. This setting affects all menus, not just the Tray menu.
Thanks for your suggestions.