What can we improve?




integer IPS_GetScriptIDByName (string $ScriptName, integer $ParentID)


ScriptName Name of the script
ParentID Object whose child objects are searched for the script


ID of the found script, otherwise FALSE


This function tries to determine the ID of a script with the name ScriptName and the parent with the ID ParentID. It returns the ID of the first found script whose name matches with ScriptName. If such a script is found, its ID is returned, otherwise FALSE.

Compared to IPS_GetScriptID, this function uses an additional criterion (ParentID) for the the search. Thus, the probability to find the intended ID is considerably larger. Remember:

Caution: Names in IP Symcon can be chosen freely, so they are not unique. For this reason, the command can return a wrong ID.

This function generates a warning if the name was not found. Use the @ operator, if you want to suppress this message. The exact function of this operator is described in the PHP manual.


$ScriptID = @IPS_GetScriptIDByName("Rain sensing", $ParentID);
if ($ScriptID === false)
    echo "Script not foung!";
    echo "The Script ID is: ". $ScriptID;
Deutsche Webseite verfügbar
Go to cart
Any questions?