Documentation
IPS_AbortScript
bool IPS_AbortScript (int $ScriptID)
Parameters
| ScriptID | ID of the flow script |
Returns
If the function succeeds, it returns TRUE, otherwise FALSE.
Description
The function aborts all running and all queued executions of the flow script with the ID ScriptID. The executions get the status "aborted by user". A step that is currently executed is not interrupted, but no further steps are executed after it has finished. Running wait actions (e.g. "Wait") end their waiting time early. If the flow script has no running or queued executions, nothing happens.
Only flow scripts can be aborted. For a PHP script, the function fails with "Aborting is only supported for flow scripts!", for an ID that does not exist with "Script #... does not exist". IPS_GetScript returns the type of a script.
A flow script is started e.g. with IPS_RunScript or IPS_RunScriptWait. Within a flow script, the action "Abort Execution" is available for this purpose.
Example
// Aborts all executions of the flow script
IPS_AbortScript(12345 /*[Close Shutters]*/);