Script Functions

Script functions allow you to manage scripts on the inSCADA platform with script/expression. With these functions, you can run scripts, stop them and check their status.

Get Script Status

ins.getScriptStatus(String scriptName)

Provides information about the status of a script.

scriptName : Name of the script.

Return Value: Returns a string of information about the status of the script.

Syntax

var status=ins.getScriptStatus("Script_01");
if (status==="Scheduled") {
    ins.notify("info","Script_01","Script_01 is scheduled");
}

Activate a Script

ins.activateScript(String scriptName)

Enables a script to run periodically by activating it. It schedules the script.

scriptName : Name of the script.

Return Value: Does not return any value.

Syntax

ins.activateScript("Script_01");

Deactivate a Script

ins.deactivateScript(String scriptName)

Deactivates a script and stops it from running periodically.

scriptName : Name of the script.

Return Value: Does not return any value.

Syntax

ins.deactivateScript("Script_01");

Last updated