ph_runscript_5 PowerHome formula function
Description
Executes a WSH (Windows Script Host) file and passes five parameters.
Syntax
ph_runscript_3 ( timeout, filespec, name, parameter1, parameter2, parameter3, parameter4, parameter5 )
Argument |
Description |
timeout |
Integer. Timeout. Specifies the time in milliseconds after which the user will be presented with an option to continue or discontinue execution of the script. A value of –1 means the script will never timeout. A value of 0 will fire the timeout event when it is detected that the script is hung.
|
filespec |
String. The full path and filename of the WSH file you wish to execute.
|
name |
String. The function or subroutine which should be executed.
|
parameter1
|
Value. The first parameter to be passed to the called function. Can be any datatype.
|
parameter2
|
Value. The second parameter to be passed to the called function. Can be any datatype.
|
parameter3
|
Value. The third parameter to be passed to the called function. Can be any datatype.
|
parameter4
|
Value. The forth parameter to be passed to the called function. Can be any datatype.
|
parameter5
|
Value. The fifth parameter to be passed to the called function. Can be any datatype.
|
Return value
String. Returns the output of the called function or the text of an error.
Examples
The following examples demonstrate typical syntax/usage for this function.
• ph_runscript_1(10,"C:\powerhome\web\WthrImgs\weather.vbs","main","temperature","Match","Current", 72, "STAT2")
• ph_runscript_1(0,"C:\powerhome\Control\ContactSense.vbs","main","Input",2,"write", 1, "SAVE")