Announcement

Collapse
No announcement yet.

Script Question

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Script Question

    Is there a way to copy the device value of one device, and make it the device string of a different device, preferably in a .net script or maybe even better a single script statement I can have run from an event?
    Marty
    ------
    XPpro SP3 /w HS Standard 2.5.0.80, HSTouch Server - 1.0.0.70, HSTouch Client 1.0.0.73 HSTouch Android - 1.0.0.2, HSTouch iPhone - 1.0.0.2
    Playing with HS3 a bit but it's just play at this point.

    #2
    Originally posted by nightwalker View Post
    Is there a way to copy the device value of one device, and make it the device string of a different device, preferably in a .net script or maybe even better a single script statement I can have run from an event?
    This might work.
    Code:
    dim A
    A=hs.devicevalue("A1")
    hs.devicestring("A2")=a
    sigpic
    A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"

    Comment


      #3
      One-liner :

      &hs.SetDeviceString "A2", CSTR(hs.DeviceValue ("A1")), True

      Comment


        #4
        Or, for vb.net:

        hs.SetDeviceString("A2", hs.DeviceValue("A1").ToString)

        tenholde
        tenholde

        Comment


          #5
          I think that gives Nightwalker some ideas.
          sigpic
          A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"

          Comment


            #6
            i'll say it does. no wonder I get confused with scripting, there's never just 'THE' way to do it.

            thanks a lot guys.
            Marty
            ------
            XPpro SP3 /w HS Standard 2.5.0.80, HSTouch Server - 1.0.0.70, HSTouch Client 1.0.0.73 HSTouch Android - 1.0.0.2, HSTouch iPhone - 1.0.0.2
            Playing with HS3 a bit but it's just play at this point.

            Comment


              #7
              Originally posted by nightwalker View Post
              i'll say it does. no wonder I get confused with scripting, there's never just 'THE' way to do it.

              thanks a lot guys.
              Welcome to HomeSeer, and the BBS.
              sigpic
              A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"

              Comment


                #8
                I think the welcome is a bit late. He has almost 900 posts.
                💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                Comment


                  #9
                  Originally posted by Rupp View Post
                  I think the welcome is a bit late. He has almost 900 posts.
                  That's Gogs on the Whisky again!
                  Jon

                  Comment


                    #10
                    Originally posted by jon00 View Post
                    That's Gogs on the Whisky again!
                    Hee Hee.

                    I meant welcome to the whoas and wherefores of HomeSeer.
                    sigpic
                    A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"

                    Comment


                      #11
                      I have been away and access was limited but now that I'm home I wanted to thank everyone for the script help.

                      scripting is a real weak spot for me with not enough time to devote to learning I'm afraid. It'll have to come in drips and drabs for now.
                      Marty
                      ------
                      XPpro SP3 /w HS Standard 2.5.0.80, HSTouch Server - 1.0.0.70, HSTouch Client 1.0.0.73 HSTouch Android - 1.0.0.2, HSTouch iPhone - 1.0.0.2
                      Playing with HS3 a bit but it's just play at this point.

                      Comment


                        #12
                        Originally posted by nightwalker View Post
                        I have been away and access was limited but now that I'm home I wanted to thank everyone for the script help.

                        scripting is a real weak spot for me with not enough time to devote to learning I'm afraid. It'll have to come in drips and drabs for now.
                        The way I leart what little I know about scripting was to download a script that looked similar to what I wanted and dicect it to see how it achieved things.

                        If I was not getting it right I then would ask the question here.

                        I discovered early on in HS2 that the manual was not a patch on HS1's. It gives you the commands, but very few examples of how to script the command.
                        sigpic
                        A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"

                        Comment


                          #13
                          I have gone to the manual several times and found the same. I know it's not HS's job to educate me on scripting but an example or two would be nice. There are more than a few of the commands where not only was there no example but the description didn't make any sense to me either. Obviously scripting is well over my head at this point in time, I've always been more of a hardware guy. Luckly my scripting needs are small and the people on this board are always quick to jump in and help out.
                          Marty
                          ------
                          XPpro SP3 /w HS Standard 2.5.0.80, HSTouch Server - 1.0.0.70, HSTouch Client 1.0.0.73 HSTouch Android - 1.0.0.2, HSTouch iPhone - 1.0.0.2
                          Playing with HS3 a bit but it's just play at this point.

                          Comment

                          Working...
                          X