« Back to Product

Documentation

IPS_CreateScript

 int IPS_CreateScript (int $ScriptType) 

Parameters

ScriptType
Value Constant Description
0 SCRIPTTYPE_PHP generates a PHP script
1 SCRIPTTYPE_FLOW generates a Flow Script
2 SCRIPTTYPE_IPSWORKFLOW generates an IPSWorkflow

Returns

ID of the newly created script

Description

This function creates a script of the type ScriptType.

The function returns an ID that can help to uniquely identify the generated script. The function automatically generates a corresponding script file, usually named ScriptID.ips.php, e.g., "43954.ips.php". It is possible to use another file with the function IPS_SetScriptFile. In this case, it is recommended to delete the previous script file to avoid unnecessary script files.

Example

$ScriptID = IPS_CreateScript(SCRIPTTYPE_PHP);
echo"The Script ID is: ". $ScriptID;
Any questions?