Announcement

Collapse
No announcement yet.

Learn to create script:

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

  • Learn to create script:

    Where can I find the overview of the whole script language (.Txt file) to homesser?

    I need to learn it.

    What is the syntax to check whether the clock greater than 13?<O</O

  • #2
    You should not use the .txt file syntax anymore. You'd better use the new .vb file syntax.

    For this new VB.NET syntax, there are many sites with tutorials.

    Just google for VB.NET tutorial or VB.NET reference
    --
    stipus

    Comment


    • #3
      If DateTime.Now.Hour > 13 Then ... End If

      [EDIT] fixed a typo...
      Last edited by stipus; November 18th, 2009, 12:09 PM.
      --
      stipus

      Comment


      • #4
        Originally posted by Dagfinn Andestad View Post
        Where can I find the overview of the whole script language (.Txt file) to homesser?

        I need to learn it.

        What is the syntax to check whether the clock greater than 13?<o></o>
        http://www.homeseer.com/support/home...2/homeseer.htm

        Many years ago I read a "Teach yourself VB.net in 21 days" book. It was very good to explain the basics. The rest is just logic.
        HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
        Running on Windows 10 (64) virtualized
        on ESXi (Fujitsu Primergy TX150 S8).
        WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

        Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

        Comment


        • #5
          I disagree with Stipus, the vb script syntax is much easier to learn for beginners and both still work just fine. The best way to learn is go to the script library and look at existing scripts. The HomeSeer help files also have many examples for each scripting command as well.
          Last edited by Rupp; November 16th, 2009, 09:42 AM.
          -Rupp
          sigpic

          Comment


          • #6
            One day you'll learn how to spell my name

            You might be right, however the old syntax is just a language from the past.

            Learning VB.Net might be usefull for many other systems...
            --
            stipus

            Comment


            • #7
              Originally posted by Rupp View Post
              I disagree with Stupis, the vb script syntax is much easier to learn for beginners and both still work just fine.
              The VB script syntax is outdated and should have been removed from HomeSeer a long time ago. In my opinion it's also harder to learn as it's not as logical as .NET is.

              Go the .NET route, you won't regret it.
              HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
              Running on Windows 10 (64) virtualized
              on ESXi (Fujitsu Primergy TX150 S8).
              WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

              Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

              Comment


              • #8
                ...the old syntax is just a language from the past.
                I am torn by this statement. While true from the standpoint that it makes effective use of current OS capabilities, vb.net design is definitely not forward looking. As far as I can tell, it was munged together by a bunch of drunk C# programmers with no one having overall project design responsibility. Worse, they don't appear to have talked to one another, or at least couldn't decide on a common set of conventions for object class specifications. Worst, they turned the task of crafting error messages over to a robot with no prior experience!

                From a usability and learning point of view, VBS is far superior. It is internally self consistent. It's documentation is comprehensive, and reasonably easy to understand. The language is inherently (by design!) quite forgiving, and when you make an error, it is usually helpful in identifying the problem and suggesting an appropriate solution.

                If you plan to go anywhere with Visual Basic, you owe it to yourself to learn to use vb.net. If you are just starting out learning how to write a script. Your frustration level will be much lower if you begin with VBS.
                Mike____________________________________________________________ __________________
                HS3 Pro Edition 3.0.0.548

                HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF, Rain8Net+ | RFXCOM | QSE100D | Vantage Pro | Green-Eye | X10: XTB-232, -IIR | Edgeport/8 | Way2Call | Ecobee3

                Comment


                • #9
                  Originally posted by Uncle Michael View Post
                  Your frustration level will be much lower if you begin with VBS.
                  I disagree.

                  I started with VBA and VBS around the time when .NET Framework version 1.0 came along. I was thrilled with the switch to .NET. Finally some structure and logic!



                  But... we can't all like the same things. And thankfully we don't.
                  HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
                  Running on Windows 10 (64) virtualized
                  on ESXi (Fujitsu Primergy TX150 S8).
                  WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

                  Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

                  Comment


                  • #10
                    Originally posted by stipus View Post
                    One day you'll learn how to spell my name

                    Learning VB.Net might be usefull for many other systems...
                    I fixed my misspelling

                    This is true but for the true beginner sometimes jumping into .net is a bit daunting and they give up. The beauty of vbs is the beginner doesn't have to worry about defining each variable type. This can be bad but when learning it make things a ton easier.
                    -Rupp
                    sigpic

                    Comment


                    • #11
                      Originally posted by Rupp View Post
                      The beauty of vbs is the beginner doesn't have to worry about defining each variable type.
                      And that is something that is wrong with VBS. The sooner people learn to declare their variables, the better. It just makes more readable code (especially when the code gets complicated, which probably is going to happen if you like HomeSeer ).


                      Developing .NET scripts with tenScripting is extremely easy!
                      Just download VB.NET Express and off you go!
                      Last edited by Moskus; November 16th, 2009, 10:21 AM. Reason: spelling
                      HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
                      Running on Windows 10 (64) virtualized
                      on ESXi (Fujitsu Primergy TX150 S8).
                      WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

                      Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

                      Comment


                      • #12
                        If I had to do it over again, I wish I had not gone VBS first. Coding in VB.NET is much easier with tenScripting. Enforcing variable type and definition is key for good programming practices.

                        Another reason is single vs multi-threading. When you have multiple scripts firing at the top of every hour, etc. you're better off having VB.NET scripts.
                        HS3Pro Running on a Raspberry Pi3
                        68 Z-Wave Nodes, 174 Events, 326 Devices
                        UPB modules via OMNI plugin/panel
                        Plugins: Z-Wave, OMNI, HSTouch, weatherXML, EasyTrigger
                        HSTouch Clients: 3 Android, 1 Joggler

                        Comment


                        • #13
                          Just read the text at the following address and then explain again why you would advise people to code in vbs instead of vb.net:

                          http://www.tenholder.net/tenWare2/tenScripting/


                          tenholde
                          tenholde

                          Comment


                          • #14
                            well said, tenholde...
                            HS3Pro Running on a Raspberry Pi3
                            68 Z-Wave Nodes, 174 Events, 326 Devices
                            UPB modules via OMNI plugin/panel
                            Plugins: Z-Wave, OMNI, HSTouch, weatherXML, EasyTrigger
                            HSTouch Clients: 3 Android, 1 Joggler

                            Comment


                            • #15
                              Originally posted by rmasonjr View Post
                              Another reason is single vs multi-threading. When you have multiple scripts firing at the top of every hour, etc. you're better off having VB.NET scripts.
                              I believe you are mixing the beginner world with the advanced world. Most beginners aren't looking to do multi-threading, they simply want to have HS speak a variable for example. I would completely agree if you are going to use a lot of HomeSeer scripts and spend the time to learn a full blown language then .net is the only way to go but most of you guys must have forgotten how it was to get started. The beginner isn't even going to know how to load tenScripting let alone use visual studio. The issue I've seen over and over is the beginner gets discouraged and quits. .vbs is a quick and dirty way to get going quick and have some instant success.
                              -Rupp
                              sigpic

                              Comment

                              Working...
                              X