Материал из Module developer
Module.GetVariable()
to request the variable state (the analog of IR.GetVariable)
Syntax
Module.GetVariable("path.name")
| input | sample | description |
| path | Tokens | type: String it indicates the path to the variable and its type:
|
| name | Update | type: String the variable name |
| output |
| значение | true | type: string, number the variable value |
Example:
IR.AddListener(IR.EVENT_START, 0, function() { // System Tokens var tag1 = Module.GetVariable("System.Update"); // Project Tokens var tag2 = Module.GetVariable("Tokens.My Var 1"); // Driver Tokens var tag3 = Module.GetVariable("Drivers.AV & Custom Systems (TCP).Online"); var tag4 = Module.GetVariable("Drivers.AV & Custom Systems (TCP).Channel 1"); // GUI Tags var tag5 = Module.GetVariable("UI.Page 1.Text"); var tag6 = Module.GetVariable("UI.Page 1.Item 1.Value"); // Server Tags (in iRidium Server only) var tag7 = Module.GetVariable("Server.Tags.Virtual 1"); var tag8 = Module.GetVariable("Server.Tags.AV & Custom Systems (TCP).Feedback 1"); });
the alias for Project Tokens: Module.GetVariable("Global.name")
