CoolMon 2 : Events
Writing events into the CML
Events are officially supported with the release of version core 0.5.6.0, hopefully this page will help you to implementing events into your CML configs.The event structure
In order to attach one or more events to a visual object, you must know the structure to use in order to make CoolMon 2 recognize the event.<visual name="text"> <parameters> ... </parameters> <content> ... </content> <events> <eventhandler trigger="OnMouseLeftUp"> <action modifier="none"> <execute>c:\windows\notepad.exe</execute> </action> </eventhandler> </events> </visual>
Above example will cause notepad to open when the left mouse button is released on the visual object.
Valid trigger are
- DoubleClick - Occurs when you doubleclick on the object
- OnMouseLeftDown - Occurs when left button is pressed
- OnMouseLeftUp - Occurs when the left button is released
- OnMouseMiddleDown - Occurs when the middle button is pressed
- OnMouseMiddleUp - Occurs when the middle button is released
- OnMouseRightDown - Occurs when the right button is pressed
- OnMouseRightUp - Occurs when the right button is released
- OnMouseWheelDown - Occurs when the mouse wheel is driven down (backwards)
- OnMouseWheelUp - Occurs when the mouse wheel is driven up (forward)
- OnMouseWheelAny - Occurs when the mouse wheel is driven either way
- OnMouseMove - Occurs when the mouse is moving the visual area (NB: Use sparse, can be a real CPU eater)
Valid Modifier keys
- None - No modifier key is pressed (event will not happen if ctrl, alt, and/or shift is held down)
- Shift - Shift is pressed
- Alt - Alt is pressed
- Ctrl - Ctrl is pressed
- Alt+Shift - Alt and shift are both pressed
- Alt+Ctrl - Alt and Ctrl are both pressed
- Ctrl+Shift - Ctrl and Shift are both pressed
- Alt+Ctrl+Shift - All modifier keys are pressed
- Any - Who cares ... (all of the above -- event will happen whether or not there is a key modifier)