What can we improve?

Documentation

(Edit)

IPS_CreateEvent

integer IPS_CreateEvent (integer $EventType)

Parameters

EventType
Value Description
0 creates a "triggered" event
1 creates a "cyclical" event

Returns

ID of the newly created event

Description

The command creates an event object of the type EventType.

The function returns an ID that can help to uniquely identify the created event object. After the application the created object is still unconfigured and must be configured with the functions IPS_SetEventActive, IPS_SetEventScript and IPS_SetEventCyclic, IPS_SetEventTrigger.

Example

$eid = IPS_CreateEvent(0);        //triggered event
IPS_SetEventTrigger($eid, 1, 15754); //On change of variable with ID 15 754
IPS_SetParent($eid, $_IPS['SELF']); //Assigning the event
IPS_SetEventActive($eid, true);    //Activate the event
 
eid = IPS_CreateEvent(1);            //triggered event
IPS_SetEventCyclic($eid, 2, 1, 0, 3, 6);   //Every day, every 6 hours
IPS_SetEventCyclicDateBounds($eid,
mktime(0, 0, 0, 12, 1, date("Y")),
mktime(0, 0, 0, 12, 31,date("Y"))); //1.12 - 31.12 of every year 
 
IPS_SetEventCyclicTimeBounds($eid,
mktime(15, 0, 0),
mktime(23, 30, 0));               //15:00 till 23:30
 
IPS_SetParent($eid, $_IPS['SELF']);   //Assigning the event
IPS_SetEventActive($eid, true);        //Activate the event
Deutsche Webseite verfügbar
Go to cart
Any questions?