Currently:
The System Tray icon recognises a Left-Click and a Right-Click, and pops up a menu to: (un)pause the script; or terminate the script.
Suggestion:
Enhance this interface in two ways:
- Distinguish between Left and Right clicks.
- Provide support for drag-drop on the icon.
When a left click is detected on the icon, display the current popup menu. But when a Right-Click is detected, popup a custom menu that will enable the user to interact with the script. The interaction (and custom menu) can be supported by new AU3 functions which identify UDFs that fire per menu item, perhaps along the lines of the following example.
;Setup custom menu MenuAdd("Change Mode", "_MnuChangeMode") MenuAdd("Reset with Defaults", "_MnuResetDefaults") : : ;Modify custom menu MenuDelete("Change Mode") : : ;Custom menu support Func _MnuChangeMode() : : EndFunc Func _MnuResetDefaults() : : EndFunc
Provide support for drag-drop on the icon:
When a user drops something on the tray icon, trigger a predefined UDF. The drop event needs to discern between different kinds of items that can be dropped (eg: text items, file-references, etc). Different UDFs need to be able to handle different kinds of drops, perhaps as illustrated below.
Plain Text
;Enable drag-drop on the SystemTray icon ;1 = Text ;2 = File ;4 = ???? DropEnable("_DropText", 1) ;-> Text DropEnable("_DropOther", 6);-> Everything else : : ;Disable the detection of non-text items DropDisable(6) : : ;DragDrop UDFs Func _DropText() : EndFunc Func _DropOther() : EndFunc
Any takers? Any comments?
I wish I could offer further input, by coding this perhaps, but my C-skills are zilch I'm afraid.
:iamstupid:
Edited by trids, 02 March 2004 - 10:20 AM.




