« Back to Product

Documentation

IPS_RunScriptTextWaitEx

 string IPS_RunScriptTextWaitEx (string $ScriptText, array $Parameter) 

Parameters

ScriptText

String that is executed as script

Parameter

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

Returns

Result of the executed script

Description

The function starts a script with the content ScriptText, passes the array Parameter as argument and waits for the end of the script execution to return its result. It is not necessary to state PHP tags.

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 executes text as script and passes parameters
echo IPS_RunScriptTextWaitEx('echo $_IPS["title"]. "course" . PHP_EOL; echo $_IPS["Tmin"] + 30.0;', Array("title" => "Temp.", "Tmin" => 10.0));
Any questions?