GetScriptPath

Purpose

This function returns the path to the directory that the last script was run from.

Parameters

None.

Returns

Return value: path
Type: string

Example

hs.WriteLog "Script Path", hs.GetScriptPath

Writes this (example) to the log:

4/1/2004 2:00:00 PM~!~Script Path~!~C:\Program Files\HomeSeer\scripts\

Or for a script run from the scripts\Includes directory:

4/1/2004 2:00:00 PM~!~Script Path~!~C:\Program Files\HomeSeer\scripts\Includes