Announcement

Collapse
No announcement yet.

are these scripting commands still available in HS4?

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

    are these scripting commands still available in HS4?

    migrating to HS4, and I'm trying to move my scripts over. Are the following script commands/functions still available? If they are, I can't find any guidance on them. Can anyone point me in the right direction?

    1) hs.launch (it doesn't seem to do anything?)

    2) calling a subroutine from a script using hs.runex and using #includes

    3) hs.speak. Does it work when a subroutine is called from a main module? or is it "not available"?

    thanks for the help!

    #2
    I believe the HS4 scripting documentation is still being written. In the meantime, use the HS3 scripting documentation which is essentially the same:

    https://help.homeseer.com/help/HS3/static/#.scripts

    hs.runex does not exist. Use hs.runscriptfunc instead


    Jon

    Comment


      #3
      Originally posted by jon00 View Post
      I believe the HS4 scripting documentation is still being written. In the meantime, use the HS3 scripting documentation which is essentially the same:

      https://help.homeseer.com/help/HS3/static/#.scripts

      hs.runex does not exist. Use hs.runscriptfunc instead

      Thanks for pointing me to the HS3 material. I'm wondering if some elements have changed? It does mention the hs.runex command (although only in passing-there's no detail).
      Pointing me to hs.runscriptfunc helps! thanks

      Comment


        #4
        Originally posted by JeffCharger View Post

        Thanks for pointing me to the HS3 material. I'm wondering if some elements have changed? It does mention the hs.runex command (although only in passing-there's no detail).
        Pointing me to hs.ruscriptfunc helps! thanks
        That's because the HS3 documentation still contains HS2 stuff which was never updated correctly.

        This may assist regarding HS2 scripting commands which are/are not available in HS3: https://forums.homeseer.com/forum/ho...97#post1106597
        Jon

        Comment


          #5
          Originally posted by jon00 View Post

          That's because the HS3 documentation still contains HS2 stuff which was never updated correctly.

          This may assist regarding HS2 scripting commands which are/are not available in HS3: https://forums.homeseer.com/forum/ho...97#post1106597
          thanks again. The post you linked provides some good insight. I continue to find differences between the HS3 documentation and what appears to work in HS4. Things like #includes no longer being available, hs.writelog not working (need to use hs.writelogex), hs.runex no longer working, some string commands no longer available. This is list continues to grow as I get some of my scripts working.

          thanks for everyone's help.

          Comment


            #6
            hs.writelog should work, however there is an ongoing bug with some scripting commands that use two parameters in HS4. There are also bug differences when using VBScript hs.writelog "Test","Test" vs VB.NET hs.writelog("Test","Test")
            Jon

            Comment


              #7
              Originally posted by jon00 View Post
              hs.writelog should work, however there is an ongoing bug with some scripting commands that use two parameters in HS4. There are also bug differences when using VBScript hs.writelog "Test","Test" vs VB.NET hs.writelog("Test","Test")
              well, hopefully the bug will be fixed. In the meantime, I'm using hs.writelogex and it's working well. thanks

              Comment


                #8
                Can you post the hs.WriteLog statement that is not working for you? Both the HS3 and HS4 versions of WriteLog should both work, depending upon the signature of your call. Here is a link that might help understand new scripting commands added in HS4 (IHsController interface): https://homeseer.github.io/Plugin-SD...r.html?tabs=vb
                tenholde

                Comment


                  #9
                  Originally posted by tenholde View Post
                  Can you post the hs.WriteLog statement that is not working for you? Both the HS3 and HS4 versions of WriteLog should both work, depending upon the signature of your call. Here is a link that might help understand new scripting commands added in HS4 (IHsController interface): https://homeseer.github.io/Plugin-SD...r.html?tabs=vb
                  this is the line that fails
                  hs.WriteLog "Info","trying writelog"

                  I'm now using this, and it works
                  hs.WriteLogEx "Info","trying writelogex","#0000f0"

                  Comment


                    #10
                    Originally posted by JeffCharger View Post

                    this is the line that fails
                    hs.WriteLog "Info","trying writelog"

                    I'm now using this, and it works
                    hs.WriteLogEx "Info","trying writelogex","#0000f0"
                    Are you using vbScript or vb.net? Not sure how vbScript is supported in HS4.
                    Code:
                    vb.net should be:   hs.WriteLog("Info","trying writelog")
                    Is the extension of your script file .txt or .vb ?
                    tenholde

                    Comment


                      #11
                      Originally posted by tenholde View Post

                      Are you using vbScript or vb.net? Not sure how vbScript is supported in HS4.
                      Code:
                      vb.net should be: hs.WriteLog("Info","trying writelog")
                      Is the extension of your script file .txt or .vb ?
                      the extension is .txt

                      Comment


                        #12
                        Originally posted by jon00 View Post
                        I believe the HS4 scripting documentation is still being written. In the meantime, use the HS3 scripting documentation which is essentially the same:

                        https://help.homeseer.com/help/HS3/static/#.scripts

                        hs.runex does not exist. Use hs.runscriptfunc instead

                        Gee, didn't I see a post from Rich that nothing has changed from HS3 to HS4 scripting and all "MY" existing scripts should still work? End result, NONE of them worked!
                        Yeah, I believe it!

                        Comment


                          #13
                          Windows or Linux?
                          tenholde

                          Comment


                            #14
                            Windows

                            Comment


                              #15
                              Originally posted by tenholde View Post
                              Windows or Linux?
                              windows 10 pro

                              Comment

                              Working...
                              X