Announcement

Collapse
No announcement yet.

How to get the name of a Device by Ref ID

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

    How to get the name of a Device by Ref ID

    I created a device a gave it a name of "Test Device". I then went to Device, Status/Graphics and clicked on the Control text to then scroll down to where the Device ID was shown.
    When I try to use hs.GetDeviceByRef(Device ID).Name, instead of getting the Device Name of "Test Device", I get "Control" retuned instead.

    Can someone tell me what I'm doing wrong?


    #2
    GetDeviceByRef returns AbstractHsDevice, you need to use property "Name"

    Comment


      #3
      Click image for larger version

Name:	Name.png
Views:	129
Size:	117.1 KB
ID:	1616155

      tenScriptAid generated this code for you
      tenholde

      Comment

      Working...
      X