« Back to Product

Documentation

IPS_GetScriptID

 int IPS_GetScriptID (string $ScriptName) 

Parameters

ScriptName

ScriptName to search for

Returns

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

Description

Warning

Since IP-Symcon 2.5 this function can no longer be used. Old IP-Symcon 1.0 functions have been removed with this release.

The function tries to get the ID of the script named ScriptName. The ID of the first script found with a name that matches ScriptName is used. If such a script was found, its ID is returned, otherwise 0 (zero).

The IPS_GetScriptIDByName function offers a more secure method of determining the ID.

Warning

Caution: Since names can be assigned arbitrarily in IP-Symcon and are therefore not unique, the function can report an incorrect ID.

Example

//Suppress error message with @ 
$ScriptID = @IPS_GetScriptID("Rain Capture");
if ($ScriptID === false)
    echo "Script not found!";
else
    echo "The script ID is: ". $ScriptID;
Any questions?