« Back to Product

Documentation

IPS_RunScriptWaitEx

 string IPS_RunScriptWaitEx (int $ScriptID, array $Parameter) 

Parameters

ScriptID

Unique ID of the script

Parameter

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

Returns

Result of current script

Description

The command causes the start of the script with the ID ScriptID and passes the array parameter as an argument and waits for the end of the script execution, to pass the result as a return value. Also here apply the hints described in IPS_RunScript.

The array Parameter can contain any number of "Key => Value" pairs (see PHP arrays). Each pair appears in the called script as variable Key with its content Value.

Example

//Script, that will launch another script with parameter passing. 
echo IPS_RunScriptWaitEx(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 = $Tmin + 30.0;
Any questions?