« Back to Product

Documentation

IPS_DeleteScript

 boolean IPS_DeleteScript (int $ScriptID, boolean $DeleteFile) 

Parameters

ScriptID

ID of the script

DeleteFile

TRUE if the file should be deleted. FALSE if the file should be moved to the 'deleted' folder.

Returns

If the command succeeds, it returns TRUE, otherwise FALSE.

Description

This function removes the script with the ID ScriptID from the internal list of scripts. The script no longer appears in the object tree and cannot be edited.

If the script file is not permanently removed by setting DeleteFile, it is moved to the "/scripts/deleted/" folder.

Warning

A script can only be deleted if it has no child objects

Example

IPS_DeleteScript($ScriptID, true); // Delete script including file
Any questions?