Announcement

Collapse
No announcement yet.

How to use $$DSR:(ref): and others?

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

    How to use $$DSR:(ref): and others?

    Hi. After using HS for many years, I just discovered what I've been wanting for a while; namely, the ability to have variable values and statuses as arguments to scripts, etc. Or least that's my understanding. Based on the sparse documentation, for example, $$DSRref): will be substituted with the label/status from the variable referenced by "ref". I cannot get it work. Unfortunately, the documentation rarely has examples.

    If my variable reference number is 1265, for example, I would think I would use either $$DSR1265): or $$DSR:1265: and it would be substituted for the label. But neither works. What is the correct syntax? Where can this be used??

    Thanks.

    #2
    Originally posted by tahl View Post
    I just discovered what I've been wanting for a while; namely, the ability to have variable values and statuses as arguments to scripts, etc. Or least that's my understanding. Based on the sparse documentation, for example, $$DSRref): will be substituted with the label/status from the variable referenced by "ref". I cannot get it work. Unfortunately, the documentation rarely has examples.
    Script functions are available independent of replacement variables? They are described in the HS Help file. How do you plan to use them?

    Click image for larger version

Name:	DevStatus.png
Views:	341
Size:	32.0 KB
ID:	1498459



    Mike____________________________________________________________ __________________
    HS3 Pro Edition 3.0.0.548, NUC i3

    HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

    Comment


      #3
      Actually the help file has problems. E.g., finding out about JSON is always a hunt, for example. Different topic....

      Yes, I currently get status, values, etc. in scripts. However, for _programs_ that I've written, which are outside the HS environment, I have to jump through hoops. For example, I have a python script that dispatches a playlist number to an audio node. Today I have to do a JSON call to HS to get the playlist number. It would be so much better if the PL number were simply an argument to the python script. Many, many other examples. Having values/labels available to pass to scripts or programs is highly beneficial.

      Comment


        #4
        AFAIK, replacement variables are not intended as script functions, but as tools to use in text files. I also doubt that they will work in an application that is not part of the HS environment, since it seems pretty likely that an HS function is required to interpret them. This is the intro to them in the Help file:

        Click image for larger version

Name:	RV.png
Views:	332
Size:	35.5 KB
ID:	1498512
        Mike____________________________________________________________ __________________
        HS3 Pro Edition 3.0.0.548, NUC i3

        HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

        Comment

        Working...
        X