« Back to Product

Documentation

IPS_RunScriptEx

 bool IPS_RunScriptEx (int $ScriptID, array $Parameter) 

Parameters

ScriptID

Unique ID of the script

Parameter

Key (string) => Value (variant) pairs that can be accessed in the newly executed script.

Returns

If the function succeeds, it returns TRUE, otherwise FALSE.

Description

The function starts the script with the ID ScriptID and passes the array Parameter as argument. The called script runs in parallel (simultaneously) to the calling script. The notes described for IPS_RunScript apply here as well.

Warning

Scripts that are executed via IPS_RunScriptEx use the following System Variables .

The array Parameter can contain any number of "Key => Value" pairs (see PHP Arrays). Each pair is available in the called script in the global variable __$_IPS at the index Key with its content Value__.

Example

//Script, that will launch another script with parameter passing.
IPS_RunScriptEx(12345 /*[Temp]*/, Array("Title" => "Temp.", "Tmin" => 10.0));

//Script that was called. Parameters are available as individual variables in the 
//global variable $_IPS. The variable name corresponds to the array index
//given name.
$Headline = $_IPS['Title']. "progress"; //Results: Temp.progress
$MaxTemp = $_IPS['Tmin'] + 30.0;
Any questions?