
This can be a string or numeric value, or even an array of different values. Parameter: Params Type: Object Description: This is a parameter or a set of parameters to send to the procedure. If this is left blank, the procedure "Main" will be run. Parameter: Proc Type: String Description: This is the name of the procedure (Sub or Function) to execute. Do not include the path in the script name. Parameter: Script Type: String Description: This is the file name of the script to run. Scripts must be located in the scripts directory in the HomeSeer application directory ( C:\Program Files\HomeSeer 3\Scripts by default). This will also return a value from the called script. This procedure runs another script and specifies a procedure to run in that script and optional parameters. Public Function RunScriptFunc( ByVal Script As String, ByVal Proc As String, _ ByVal Params As Object, ByVal Wait As Boolean, _ ByVal SingleInstance As Boolean ) As Object

Return value: Value Type: Object Description: This returns any value that the called script returns from the Main function - Sub Main will not return any values. Optional Parameter: SingleInstance Type: Boolean Description: When set to TRUE, only one instance of the script referenced by hs.RunScript can be running at a time, so if there is one instance already running, calling this again will result in an empty/null return and an error message written to the log. Set this to False to allow the script using hs.RunScript to continue processing commands after launching the additional script.

Optional Parameter: Wait Type: B oolean Description: When set to TRUE, the script that is calling hs.RunScript will not continue processing commands until the script referenced here is finished. If you need to run a specific procedure other than Main, see RunScriptFunc. The "Main" procedure in the script will be run. Scripts must be located in the scripts directory in the HomeSeer application directory ( C:\Program Files\HomeSeer 2\Scripts by default). This will also return a value from the called script provided the "Main" procedure is a function. Public Function RunScript( ByVal scr As String, ByVal Wait As Boolean, ByVal SingleInstance As Boolean) As Object Purpose If hs.IsScriptRunning("weather.txt") then hs.writelog "info","The weather script is still running" end if ' check if the script "weather.txt" is running Return value: status Type: boolean Description: This returns TRUE if the specified script is currently running and FALSE if it doesn't. Parameter: script name Type: string Description: This is the name of the script to check. This function indicates if a specified script is currently running. 2:00:00 PM~!~Script Path~!~C:\Program Files\HomeSeer\scripts\Includes Purpose Or for a script run from the scripts\Includes directory: 2:00:00 PM~!~Script Path~!~C:\Program Files\HomeSeer\scripts\

Hs.WriteLog "Script Path", hs.GetScriptPath This function r eturns the path to the directory that the last script was run from. The below information is being reconfigured for better accuracy and easier readability.
