boolean IPS_SetEventScript (int $EventID, string $EventScript)
EventID | ID of the event to be changed |
EventScript | PHP code without PHP tags (<? ... ?>) |
If the command succeeds, it returns TRUE, otherwise FALSE.
The executed Action of the Event is set to "Execute PHP Code" and the code to EventScript. The PHP code will be given directly without the PHP tags (<? ...?>).
The list of the System Variables shows what specific variables are available.
//Assign the script content to the event
IPS_SetEventScript($EventID, "echo linked object: ".$_IPS['TARGET']);