EQWatcher Evolution > Scripting  > Timers


List of commands


AddTimer, RemoveTimer, TimeLeft



The "AddTimer" Command

This command adds a timer of specified length to EQWatcher's queue of timers.

Syntax:

AddTimer([Name],[Time],[Action Type],[Action Data])


Name: The name of your timer can be pretty much anything you want it to be.  This name is simply used for accessing the trigger after it is started (you can remove it or check the time left).  I would recommend you use unique names, yet easily remembered.  Only one timer can exist with any given name.  Timer names ARE case sensitive.

Time: The number of milliseconds to wait before executing the desired action (~20ms error worst case).  The minutes:seconds conversion to milliseconds is not done automatically for you here.

Action Type: This must be a constant number, please use the identifiers shown below.

These action types are used exactly as they are shown here:

Action Data: This is formatted as a string.  Action data tells EQWatcher which information should be sent to the selected action type.  For .WAV sounds, you must supply the filename (and path if needed) of the .WAV. For CD playing, you must supply the track number to play.  For MP3 playing, you must supply a search string (explained in the WinAMP section).  For TTS, you must supply the text to speak.  For aliases, you must supply the command to execute (such as "speed" or "ETA").



The "RemoveTimer" Command

This command removes a timer of a specified name.

Syntax:

RemoveTimer([Name])


Name: The same name used to add the timer in the first place.



The "TimeLeft" Command

This command retrieves the amount of time left on a timer.

Syntax:

TimeLeft([Name])


Name: The same name used to add the timer in the first place.


Return Value:

TimeLeft returns the number of milliseconds before the timer's length of time is completed.  If the timer does not exist, 0 is returned.