Announcement

Collapse
No announcement yet.

Writing scripts

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Writing scripts

    I love HA, but I seem to be limiting myself.
    There is alot of talent within the HS message board. And I would like to tap into some of that knowledge.
    I would to find out how (if possible at home reading) to write scripts.

    -What is my best way of starting?

    -What language are scripts?

    -Is there a basic I can learn?


    I want to thank everyone in advance for any support.

    Ken

    #2
    The best way to learn scripts is to study a few. There are dozens in the scripts library to learn from. Scripts are "generally" written in vbscript or vb.net. Then start coding away. We're here if you need any help.
    -Rupp
    sigpic

    Comment


      #3
      i would suggest just trying to write a vbs script (using any text editor) to do something you want HS to do for you.

      each script file must go in the homeseer \scripts folder.

      the homeseer help will give you all the functions and syntax for each

      the simpliest format for any vbs script is

      sub Main()
      rem your code here
      end sub

      but a script file can have multiple subroutines (sub) or custom functions

      you might also check out http://www.w3schools.com/vbscript/vb..._functions.asp for a complete list of vbs functions and some samples.

      post your code (in the homeseer script forum) if you are having troubles, i am sure someone can steer you in the right direction
      Mark

      HS3 Pro 3.0.0.534
      Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway
      Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 (by Kirby) | Ultra1Wire3 | RFXCOM | NetCAM | MyQ | BLRadar | BLDenon | Jon00 Charting
      Platform: HP h8-1360t, Windows Server 2012 R2, i7-3.4GHz, 16GB memory

      Comment


        #4
        Depending on how you learn best, you might consider an internet search for vbscript tutorial or just vbscript. If you like to have a printed reference, there are hundreds of books available describing both vbscript and vb.net. I have found both the Dummies series and WROX guides useful.

        Personally, I'd recommend starting with vbscript. It's more forgiving and quite a bit more intuitive than vb.net. There are some quirks to using scripts within HS, but those should become fairly obvious once you learn the basics of vbscript and look at some examples of scripts in HS.
        Mike____________________________________________________________ __________________
        HS3 Pro Edition 3.0.0.548, NUC i3

        HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

        Comment

        Working...
        X