integer IPS_GetMediaID (string $MediaName)
|MediaName||Name of the searched media object|
ID of the searched media object, 0 if no object is found
The command tries to determine the media object with the name MediaName. The ID of the first found media object whose name matches MediaName is returned. If no media object with that name is found, the command returns 0.
A safe command to determine the ID is IPS_GetMediaIDByName.
As names within IP-Symcon are not unique it is possible that the commands returns a wrong ID.
$MediaID = IPS_GetMediaID("Rain"); if ($MediaID == 0) echo "Media object not found!"; else echo "The ID of the media object is ". $MediaID;