Announcement

Collapse
No announcement yet.

is it possible to use HS as variable

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

    is it possible to use HS as variable

    Is it possible to create homeseer commands as objects and use them as varibles like so. The below example does not work but I'm looking for the correct syntax if available. thanks

    Set unlocked = CreateObject("hs.isoffbyname")

    #2
    I'm not sure I fully understand your question. Would 'unlocked' then be used like:

    unlocked(device_name as string)

    Basically extending 'hs.isoffbyname'?

    -Dave

    Comment


      #3
      I just tried it and received an error: " ActiveX object can not create objext"

      -Rupp
      💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

      Comment


        #4
        I'm trying to use it so the rest of the script reads commands that would make sense yto a non scripter. instead of if hs.isoffbyname the term if unlocked could be used for a door sensor.
        Rupp, thats the smae error I get.

        Does anyoone know if this can be done with the correct syntax?

        Comment


          #5
          I don't believe this will work because "isoffbyname" is a function (i.e. method) of the hs object. It does not contain the required constructor code that an object has.

          Comment

          Working...
          X