VBScript plugin development

HouseBot Plugin Development Discussions.
Post Reply
acheslow
Senior Member
Posts: 168
Joined: Wed Aug 20, 2003 3:23 pm
Location: Bothell, WA
Contact:

VBScript plugin development

Post by acheslow »

I don't know anything about Visual Basic but when it comes to VBScript I know "just enough to be dangerous" as they say. Can anyone describe if/how I can create device properties from within VBScript? I know how to set the values of existing properties in VBScript and I've seen the SDK that describes how to create new properties in Visual Basic but I can't figure out how to implement the SDK in VBScript.



Thanks,

Alan
ScottBot
Site Admin
Posts: 2787
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

Alan,



It is not possible to create Properties in a Script Device. The idea there is that the Script Device IS the Device and it's Properties are already setup. You can, however, manually add Properties to a Script Device by right-mouse clicking on the Device in the tree view and selecting "Add Property...". I do this many times to add variables that the Script can use that are persistent between script executions.



The Device SDK's (VB and C++) have methods for creating Properties because the type of device and it's required properties are defined by the developer.
Scott
acheslow
Senior Member
Posts: 168
Joined: Wed Aug 20, 2003 3:23 pm
Location: Bothell, WA
Contact:

Post by acheslow »

Scott, I don't think I asked my question clearly. I'm not trying to add properties to a script device. I'm trying to use a VBScript to create a new software interface device and add properties to it. The HouseBot SDK says "any language that supports COM and allows you to implement a COM interface could be used" and I was hoping to be able to use VBScript.



Specifically, here's what I want to do. I've created a Null device and manually added about 50 properties to it. I wrote a VBScript to populate all of the properties and everything works fine. However, I'm just trying to lessen the manual work required if I ever need to recreate the device or share it with others. So I was trying to see if there was a way to use a VBScript to programmatically create the null device and the 50 or so properties.



Thanks
ScottBot
Site Admin
Posts: 2787
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

Alan,



Unfortunately you can't do that either. :(



However, if you're only interested in sharing your Devices, check out the Configuration Exporting functionality. It was specifically designed for sharing portions of configurations. It allows you to export Devices, Tasks, Themes, etc. You can specify additional files (like the script file) as well. It will do the nasty work of re-mapping all of the various IDs for the new objects into the users system. It's not 100% perfect, but it handles most of the needs.
Scott
Post Reply