tenWare Software

How tenScripting Works

tenScripting is distributed as multiple MS Visual Studio projects within a single VS Solution.  It contains all of the code that creates the development environnent providing access to the HomeSeer classes.  When you run the tenScripting4 solution (click on >Start) it:

(1) Connects to your HomeSeer server to create remote copies of the key HomeSeer classes

(2) Finds and parses all of the .vb and .cs files that are included in the project folders.  There are several sample script files included in the distributed solution (SimpleSamples.vb, csSimpleSamples.cs,  ComplexSamples.vb, and csComplexSamples.cs).  You add your own script files to the solution for testing.

(3) Populates the drop-down lists with the files, scripts, and methods found in these files.

Once tenScripting is running and connected to HomeSeer, you select the file/script/method that you want to run/debug. You can optionally enter a parameter for the method you selected, to be passed to the method when it is run.  When you click on the Run button, tenScripting attempts to find in memory the compiled version of the script you specified.  Because you added your script file to the tenScripting solution, Visual Studio compiled your scripts, along with the tenScripting base code, and loaded them into memory.  After your compiled script is located in memory, tenScripting executes it, passing to it the parameter you specified. Your script is now running in the development environment.  Once your script completes (usually very quickly), you are ready to select another script to run/test.  If you need to make changes to your script, close tenScripting, make the changes, and then start tenScripting again.

tenScripting coordinates with another utility, tenHsEvents, to display in real time any device changes as they occur, and displays HS Log records as they are written to the log.  This aids in checking the proper execution of your script.  If you check Use tenHsEvents for Log Display, then the tenHsEvents window will open following each execution of a script from within tenScripting.

Once your script is fully debugged, tenScripting can then easily copy it to your HomeSeer scripts folder via a network share (see Exporting Scripts).

The tenScripting program window:

Screen