monitorMessage function
monitorMessage
monitorMessage (message, function_to_call, parameters...)
Creates a monitor for the message. If the message either changes color or scrolls off the screen, the function specified by the string function_to_call is called.
Parameters:
message - the message for the monitor.
function_to_call - the function to call when
message
scrolls off the screen or changes color.
optional additional parameters passed to the monitoring function.
Returns:
This function does not return a value.
Example:
The following rule triggers on white messages. When the message scrolls off the screen, or changes color, the "clearRd" function (below) is called.
trigger on message.COLOR == WHITE
markMessagePermanent(message)
monitorMessage(message, "clearRd", "A", "B", "C")
markMessagePermanent(message)
monitorMessage(message, "clearRd", "A", "B", "C")
Below is an example of the monitor function.
Example:
function clearRd(message, reason, a, b, c)
// The variables a, b, and c are "A", "B", "C", respectively in this example
// Cancel monitoring. The monitoring function must properly identify itself
// to unmonitorMessage by passing its name in order to successfully remove
// itself from the list of monitors.
unmonitorMessage(message, "clearRd")
// Remove the message from viewer permanent message panes
clearMessagePermanent(message)
return 0
// The variables a, b, and c are "A", "B", "C", respectively in this example
// Cancel monitoring. The monitoring function must properly identify itself
// to unmonitorMessage by passing its name in order to successfully remove
// itself from the list of monitors.
unmonitorMessage(message, "clearRd")
// Remove the message from viewer permanent message panes
clearMessagePermanent(message)
return 0
Related topics
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*