tenScripting Frequently Asked Questions
tenScripting cannot find my script(s)
and/or method(s)
There are several things to
understand. First, ALL .vb files in the project directory will be scanned.
Even if the file is not included into the Project. So, only include files
in the project folder that belong. Secondly, each .vb file that contain
your scripts must be included into the project (menu: Project/Add
Existing File). It is not enough to be located in the project folder, it
must be included into the project. Finally, the Sub must be declared as
Public
for tenScripting to load it, and the parameters must be defined properly for the
method's signature to match. Define it as:
Public Sub Main(ByVal Parms as Object)
I added my .vb class file to the
project, and defined my class and functions. When I run tenScripting,
it shows my file in the dropdown list, but my method does not appear in the
dropdown list.
Make sure that you
define your method as Public, ie:
Public Sub Main(ByVal Parms as Object)
Does tenScripting work on 64-bit Vista?
Yes, but there is a small bug in
version 1.1.0.. There is an easy fix:
In the Solution Explorer, right-click
tenScripting and click on Properties
Select the Compile tab and click on
the Advanced Compile Options... button
Set the Target CPU: drop-down to
x86
Click the OK button
This is corrected in version 1.2.0
I am trying to access a HomeSeer plugin from my script
using:
p=hs.plugin("MyPlugin"). My script works okay running
in HomeSeer, but it fails in tenScripting
indicating the plugin class cannot be found. Can I create a remote
reference to my HomeSeer plugin?
Yes, you can. You must copy the HSP_ dll
file from the plugin into your project (suggest \bin\debug) and create a
reference to it in your project. To create a reference, right-click References
in the Solution Explorer and click on Add Reference .... Select the
Browse tab, and then browse to the file you just copied, and click OK.
When I open the file
\tenScripting\tenScripting.suo in Visual Studio all I see is a screen full of
funny characters.
Make sure that you use the menu item
File/Open Project , not File/Open File
Can I run tenScripting from a computer not on my local
network, from outside my router/firewall?
Yes. First, you must tell your router/firewall to
open and forward to your HomeSeer server a port for tenScripting to use. I
suggest 8737.
Then run tenScripting and change the connection parameters. Specify the IP
address of your router and the port you forwarded. You can use a domain
name as well. For version 1.1.0 or earlier, Enter something like: my.domain:8737 or
123.234.231.45:8737
In version 1.2.0, a separate port parameter was
added so you specify the IP address and the port seperately.
ComplexSamples.vb/MultipleEntryPoints/ScheduleDeviceActions code to delete
existing Events is incorrect.
It will be fixed in releases 1.4.0 and should be:
'' Delay requested, schedule it
'''' Remove any Existing Events
hs.RemoveDelayedEvent("", TempEventName) ' remove any scheduled event executions
hs.DeleteEvent(TempEventName) ' remove the event definition