|
Mach Modules Documentation
Lua Module API Documentation
|
Go to the source code of this file.
Functions | |
| DataTracker | SetTrackerState (config_name, state) |
| Set the on/off state of a named custom tracker via the DataCollector plugin. | |
| DataTracker | ToggleTracker (config_name) |
| Send a toggle event for a named custom tracker via the DataCollector plugin. | |
| DataTracker | ClickTracker (config_name) |
| Send a click event for a named custom tracker via the DataCollector plugin. | |
| DataTracker | new (config_name, current_state) |
| Create a new DataTracker instance for a custom data collector tracker. | |
| DataTracker | SetState () |
| Set the state of this tracker instance. | |
| DataTracker | Toggle () |
| Send a toggle event for this tracker instance. | |
| DataTracker | Click () |
| Send a click event for this tracker instance. | |
| DataTracker Click | ( | ) |
Send a click event for this tracker instance.
Delegates to DataTracker.Click() using the config_name stored on this instance. A click event represents a momentary or counted interaction with the tracker.
| DataTracker ClickTracker | ( | config_name | ) |
Send a click event for a named custom tracker via the DataCollector plugin.
Sends a "click" command to the DataCollector plugin for the specified tracker using w.RegSendCommand(). A click event represents a momentary or counted interaction.
| config_name | (string) The internal configuration name of the tracker to click |
| DataTracker new | ( | config_name | , |
| current_state | ) |
Create a new DataTracker instance for a custom data collector tracker.
Registers a new custom tracker with the DataCollector plugin via w.RegSendCommand(). If only one of pretty_name or config_name is provided, the other defaults to the same value. Periods and semicolons are stripped from config_name to ensure compatibility with the DataCollector API command format. If the tracker already exists, creation is silently ignored. If creation fails for any other reason, w.Error() is raised.
| pretty_name | (string|nil) The human-readable display name for the tracker. If nil, defaults to config_name |
| config_name | (string|nil) The internal configuration name used in API commands. Periods and semicolons are removed. If nil, defaults to pretty_name |
| current_state | (number|nil) The initial numeric state of the tracker. Defaults to 0 if nil or non-numeric |
| DataTracker SetState | ( | ) |
Set the state of this tracker instance.
Delegates to DataTracker.SetState() using the config_name stored on this instance. Accepts the same state values as DataTracker.SetTrackerState(): 1/true/"on" or 0/false/"off".
| state | (number|boolean|string) The desired state. Accepts 1, true, or "on" to enable; 0, false, or "off" to disable |
| DataTracker SetTrackerState | ( | config_name | , |
| state | ) |
Set the on/off state of a named custom tracker via the DataCollector plugin.
Sends an "on" or "off" command to the DataCollector plugin for the specified tracker using w.RegSendCommand(). Accepts multiple representations of true/false to allow flexible calling conventions. Raises w.Error() if state is nil or not a recognized value.
| config_name | (string) The internal configuration name of the tracker to update |
| state | (number|boolean|string) The desired state. Accepts 1, true, or "on" to enable; 0, false, or "off" to disable. Any other value raises an error via w.Error() |
| DataTracker Toggle | ( | ) |
Send a toggle event for this tracker instance.
Delegates to DataTracker.Toggle() using the config_name stored on this instance. A toggle event switches the tracker between its on and off states.
| DataTracker ToggleTracker | ( | config_name | ) |
Send a toggle event for a named custom tracker via the DataCollector plugin.
Sends a "toggle" command to the DataCollector plugin for the specified tracker using w.RegSendCommand(). A toggle event switches the tracker between its on and off states.
| config_name | (string) The internal configuration name of the tracker to toggle |