Facility Control

 View Only
  • 1.  Getting dashboard objects in ogScript

    Posted 08-13-2016 07:35
    Hi,

    I have a large number of buttons on a Dashboard panel. I'd like to loop through them all and set their colours dependent on the initial characters of their ID. I'd prefer to not have to list each button individually in the code, any idea how I can read the contents of the panel so I can do this?

    Many thanks,
    Martin


  • 2.  RE: Getting dashboard objects in ogScript

    Posted 08-15-2016 20:51
    Unfortunately, there is no way to list all buttons on a panel when they have different IDs. It would be much easier if the buttons of each colour all had the same ID (multiple components can have the same ID).

    What else are you using the ID field for?
    #DashBoard


  • 3.  RE: Getting dashboard objects in ogScript

    Posted 08-16-2016 07:17
    Thanks James

    I'll stop looking for a way, I can use an array with all the IDs in.

    The panel controls a comms matrix and the buttons are lit individually by strings that comes back from the matrix. The first three characters of the button ID determine the on (and off) colour of the button - there are a number of button types that share the same colouring. I was looking to set initial states of some of the button types, being able to loop through the panel components would be a neat way of doing it.

    Thanks again,
    Martin


    #DashBoard