MLTimer Plugin

From Cinemar Wiki
Jump to: navigation, search

Plugin Syntax

MLServeCmd.MLTimer|<<parameter>>~<<parameter>>


Plugin About

This driver implements multiple timer controls for MLServer. A total of 64 timers, numbered 1 through 64, are available for use. Each timer can have its own defined interval and associated MLServer command that is fired when the timer expires. Timers can be run once or repeating. This driver supports three commands.

SetTimer~Timer#~Style~Interval~Units~MLCmd~Enable

 where
   Timer# = 1..64
   Style  = Repeat or NoRepeat
   Interval = 1..n units
   Units = seconds, minutes, hours, days
   MLCmd = MLServer command to execute (max 255 chars, no tildes allowed)
   Enable = on, off (blank is same as off)

Enable~Timer# will turn on timer Timer#

Disable~Timer# will turn off timer Timer#

Examples: To dynamically create a timer and activate a command map with it use MLServeCmd.MLTimer|SetTimer~1~NoRepeat~10~minutes~mymacro~on

To turn a pre-defined timer on use MLServeCmd.MLTimer|Enable~1

To turn a pre-defined timer off use MLServeCmd.MLTimer|Disable~1