Announcement

Collapse
No announcement yet.

Changing text to location?

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

    Changing text to location?

    Pardon me for cross-posting this, but I wasn't getting any replies on the other in the Designer section.

    What I'm trying to do is simply create a custom template button with the lights status below, button changes color with light status, and name above text is populated with either device name or ideally device location 1 or 2. Then I could simply drag the custom template to the screen, assign it to the proper device, and rinse/repeat. Then if I changed device location 1/2 it would change on the screen without my having to go in and change the text in Designer. I'm assuming I could do this with an immediate script somehow to change the text but I haven't stumbled on the solution yet. I must be missing it, but I don't see in the scripting documentation how to retrieve the location.

    Any suggestions?

    #2
    I'm not sure you can if I understand what you are trying to do correctly, there would still be some sort of manual input needed to change either the device reference or whatever. To get the location it is possible (you first have to get the device as the location is only exposed via the device class) but again it is going to need manually updating.

    Comment


      #3
      Thanks for the info.

      What I was trying to do (since I'm creating a lot of identical security and light status indicators) was create a custom group consisting of a button graphic with the release driving an on/off toggle and status images and status tracking based on the specified device.

      This seems to work, and when I drag the custom group in I get the prompt for the new device. I was trying to also create a text box (and specify a device for its status tracking) as a part of the custom group to provide the name/location1,etc of the device based on the status tracking device. My thought was that if the text was based on this script, then whenever a device location 1/2 name changed it would change all the text boxes and I wouldn't have to edit design every time that it would simply update with my device changes.

      Of course, in the meantime I've done it the painful manual way, but it seems there still would be an easy way to just populate a text with the name/location of the status tracking device.

      Comment

      Working...
      X