EQWatcher Evolution > Scripting > Triggers
List of commands
The "AddTrigger" Command
This command adds a trigger to EQWatcher's list of things to watch for in the log file.
AddTrigger([Name],[Trigger Text],[Action Type],[Action Data])
Name: The name of your trigger 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). I would recommend you use unique names, yet easily remembered. Only one trigger can exist with any given name. Trigger names ARE case sensitive.
Trigger Text: The trigger text contains EXACTLY what EQWatcher should be looking for in your log file. It must contain every single part of the line, including the time and date stamp. When using the core script's aliases to create triggers, you only need to account for what you see in the chat window (the time and date stamp is automatically taken care of). Variables are used to account for parts of the text that are unknown or can vary (i.e. variable).
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:
- SND_WAVE - Plays a .WAV sound, asynchronously
- SND_SYNCWAVE - Plays a .WAV sound, synchronously
- SND_CD - Plays a single CD track
- SND_MP3 - Plays an mp3
- SND_TTS - Speaks some text, asynchronously
- SND_SYNCTTS - Speaks some text, synchronously
- SND_ALIAS - Executes an EQWatcher command (alias)
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 "RemoveTrigger" Command
This command removes a trigger of a specified name.
Name: The same name used to add the trigger in the first place.