Announcement

Collapse
No announcement yet.

VBScript

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

    VBScript

    Two questions:
    1. Is there a difference between .vb and .vbs use in HS3?
    2. What no cost scripting program is best for scripting for the above answer?

    Thanks

    Dennis

    #2
    If you're serious about scripting then I suggest you grab a copy of Visual Studio Express as it will be a big help,to write your scripts in a decent IDE. Also grant copy of tenholde's tenscripting code to make debugging scripts so much easier.

    If you just want to knock together a few quick lines of code then Andy good text editor will do you.

    Vbs is vbscript while vb is .net Visual Basic code. If you're just starting out then go with Visual Basic as it's the future for all HS3 scripts.


    Sent from my iPad using Tapatalk HD
    Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

    Comment


      #3
      Originally posted by spudbw View Post
      Two questions:
      1. Is there a difference between .vb and .vbs use in HS3?
      2. What no cost scripting program is best for scripting for the above answer?

      Thanks

      Dennis
      Go for vb.net in HS3. I have not tried anything particularly advanced but I imagine some of the rather more advanced scripting options that return some of the custom classes/.net types may not work (?) if you try them in VBScript. VBScript always was a little more forgiving but you can do less with it.

      I'm not sure I would bother personally with VS for just scripting, it certainly can be used to write plugins quite adequately but then things like Intellisense are handy with the complexity of a plugin. I wrote all of my scripts in plain notepad and that teaches you to pay attention when you are writing them. There are some alternatives like Notepad++ I have seen some talk about that could be worthwhile, includes things like line numbers etc.

      Comment


        #4
        http://www.tenholder.net/tenWare2/te...3/default.aspx

        tenholde
        tenholde

        Comment


          #5
          I use EditPlus for my scripts. It helps with making sure the syntax is correct. The one advantage of vbscript is that typically it tells you the line number the error occurs in. I have both vb and vbs scripts working with hs3 and both work fine. Most new scripts I write now are vb. I've been meaning to try out tenscripting, but haven't gotten to it yet.

          Cheers
          Al
          HS 3.0.0.548: 1990 Devices 1172 Events
          Z-Wave 3.0.1.262: 126 Nodes on one Z-Net

          Comment


            #6
            Thanks all. I am not intending to program. I only need to cut n' paste a some pre-written lines provided by Blade for his BLOccupied program. Since I could not get the program to work with vbs, I thought it may be the need to have the script in vs instead of vbs.

            Comment


              #7
              Up for a Challenge?

              New to scripts. Found a cool relay that i want to incorporate into my Homeseer system (here) but the first post is for Linux and I am on Win7. Never did anything with scripting so if someone can help me with direction on how to set this up in an event in Homeseer 2 and 3 and what needs to be in the script file I would really appreciate it. I dont think this is hard its only a few lines of code but not knowing VB.NET I am lost. I think i need them in VB.NET so that when I convert from HS2 to HS3 I will not need to re-do the scripts. Correct? Any help is appreciated!!!

              Comment


                #8
                You would want to get a hold of the manual for the relay board first to see exactly what characters it expects to be sent to it to control the relay, unless it is exactly the same I would want to double check. If you can post on here someone can probably help...sending characters to a port is fairly easy to do but unless you know that you are sending the right ones it can be a tail chasing exercise.

                Comment


                  #9
                  Originally posted by DaleRS View Post
                  I think i need them in VB.NET so that when I convert from HS2 to HS3 I will not need to re-do the scripts. Correct? Any help is appreciated!!!
                  Hi Dale,

                  As an FYI, HS3 supports both vb.net and vbscript, so from that perspective there's no need to convert the scripts from HS2 to HS3. However, there are large differences to the script commands for devices and events between HS2 and HS3 so that will cause most of the conversion work. As mrhappy said, you can do more with vb.net but vbscript is more forgiving and typically will tell you exactly which line item is causing a problem making debugging easier. I typically write all my new scripts in vb.net unless I have similar functionality in an existing vbscript file and then use it as a starting point.

                  Cheers
                  Al
                  HS 3.0.0.548: 1990 Devices 1172 Events
                  Z-Wave 3.0.1.262: 126 Nodes on one Z-Net

                  Comment


                    #10
                    Originally posted by sparkman View Post
                    Hi Dale,

                    As an FYI, HS3 supports both vb.net and vbscript, so from that perspective there's no need to convert the scripts from HS2 to HS3. However, there are large differences to the script commands for devices and events between HS2 and HS3 so that will cause most of the conversion work. As mrhappy said, you can do more with vb.net but vbscript is more forgiving and typically will tell you exactly which line item is causing a problem making debugging easier. I typically write all my new scripts in vb.net unless I have similar functionality in an existing vbscript file and then use it as a starting point.

                    Cheers
                    Al
                    Whilst true with the Windows version of HS3, VB.NET is only supported on the Linux versions of HS3....
                    Jon

                    Comment


                      #11
                      Originally posted by jon00 View Post
                      Whilst true with the Windows version of HS3, VB.NET is only supported on the Linux versions of HS3....
                      Good point

                      Cheers
                      Al
                      HS 3.0.0.548: 1990 Devices 1172 Events
                      Z-Wave 3.0.1.262: 126 Nodes on one Z-Net

                      Comment


                        #12
                        Scripting

                        Thanks for all the feedback. I found a plugin "drhsIpPlugIn plug-in" from another thread that allows for output to IP/Serial that is exactly what i need so the plugin works in HS rather than external scripting much easier, for me anyway. LOL its a great plugin!!! Thanks again for the posts and help.... I am sure you will hear more from me when I convert to HS3 sometime soon!

                        Comment

                        Working...
                        X