Hallo,
mit PHP habe ich einen Timer erstellt. Das funktioniert.
Ich schaffe es aber nicht die Aktion auf „Quellcode ausführen“ einzustellen und einen PHP-Skript (CheckBox „Code anzeigen“ ausgewählt) zuzuweisen. Das PHP-Skript selbst funktioniert. Aktuell ist für Aktion immer „Skript starten“ ausgewählt.
Was muss ich ändern?
Alexander
$eventId = @IPS_GetEventIDByName($timerName, $_IPS[‚SELF‘]);
if ($eventId)
return $eventId;
$eventId = IPS_CreateEvent(1); // erstellt ein Ereignis vom Typ „Zyklisches Ereignis“
$result = IPS_SetParent($eventId, $_IPS[‚SELF‘]); // Ereignis zuordnen
if ($result)
{
$result = IPS_SetEventCyclic($eventId, 0, 0, 0, 0, 2, 1);
if ($result)
{
$script = „IPS_RunScriptEx(“.$_IPS[‚SELF‘].", array(‚Caller‘ => ‚Minute30‘));";
$result = IPS_SetEventScript($eventId, $script);
if ($result)
{
IPS_SetEventCyclicTimeFrom($eventId, 0, 0, 30);
}
}
}
$result = IPS_SetName($eventId, $timerName);