Require: IP-Symcon >= 4.0
int RegisterScript (string $Ident, string $Name, string $Contents, int $Position)
Ident of the script
Name of the script
Content to be entered in the script.
Position in the object tree and thus also in the visualization.
Returns the ObjectID of the script that has been created or that already exists
Creates a script with the Ident Ident, name Name, content Content and the position Postion, if the specified Ident does not already exist.
In both cases, the ObjectID of the script that has been created or that already exists is returned.
The content of Content is overwritten every time, always guaranteeing the correct content, even after changes. For scripts which are to be processed, it is recommended to use a configuration form with SelectScript-selection
$scriptID = $this->RegisterScript("TextSxript", "My TestScript");