Lighting Dashboard

106 views
Skip to first unread message

TMS

unread,
Feb 8, 2021, 6:48:26 PM2/8/21
to QLab
I would like to have external sliders to set rgb values of selected.color  (the sliders underneath the pretty color triangle) in the light dashboard. I'm seeing that the UI table elements change depending on what lighting instruments and /or controllers are selected.

I know I can store the live slider values in the wait time of a dummy cue and that works well when I can predict what path of the UI button. 

I know what I'm trying to say is:

set value of value indicator 1 of slider 1 of UI element 1 of row X of table 1 of scroll area 2 of splitter group 1 of window windowName to storedvariable

I know that X is the index of table row that contains a text UI element with a value of "selected.color" I'm having trouble wrapping my head around setting that X

micpool

unread,
Feb 8, 2021, 8:07:15 PM2/8/21
to QLab
Are you over complicating things?

UI scripting the lighting dashboard seems to be reinventing the wheel, as any  parameters of any light can be controlled with OSC. Whats the difference in remoting the rgb sliders in the sidebar to remoting the rgb sliders in the Light instruments?

Or have I missed the point?

Mic

Traveling Monkey

unread,
Feb 8, 2021, 8:38:35 PM2/8/21
to ql...@googlegroups.com
This isn't for any one venue or installation for a determined list if instruments. I'm thinking about this as a way to more ergonomically deal with the hours of clicking in those little on screen sliders during programming.


One set of sliders on a tablet that set rgb of the selected lights, whichever they are.

I'm not aware of a way to send these messages to the sidebar.




Nils Erickson
Live & Location Audio
www.TravelingMonkeySound.com
707.636.4042 (office)
617.921.5437 (cell)

--
Contact support anytime: sup...@figure53.com
Follow QLab on Twitter: https://twitter.com/QLabApp
User Group Code of Conduct: https://qlab.app/code-of-conduct/
---
You received this message because you are subscribed to the Google Groups "QLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qlab+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qlab/8c23bbe5-fa5a-4e07-862f-5bd64c20d757n%40googlegroups.com.

micpool

unread,
Feb 8, 2021, 9:16:14 PM2/8/21
to QLab
Can you give an example of an instrument where the selected color if it is displayed  is not row 1 in the sidebar?

Aside from that disarmed text cues are a good place to set and store variables with OSC

In this example I am using these parameters for rgb storage  in a cue numbered "RGB":  translation x is R translation y is G and scale x is B

tell application "QLab" to tell front workspace
try
set r to translation x of cue "RGB"
set g to translation y of cue "RGB"
set b to scale x of cue "RGB"
end try
end tell

tell application "System Events" to tell (first application process whose bundle identifier is "com.figure53.QLab.4")
try
tell UI element 1 of row 1 of table 1 of scroll area 2 of splitter group 1 of (first window whose title contains "Dashboard")
set value of value indicator 1 of slider 1 to r
set value of value indicator 1 of slider 2 to g
set value of value indicator 1 of slider 3 to b
end tell
end try
end tell

On Monday, February 8, 2021 at 11:48:26 PM UTC TMS wrote:

TMS

unread,
Feb 8, 2021, 9:57:08 PM2/8/21
to QLab
Screen Shot 2021-02-08 at 6.46.57 PM.pngI

When anything from a group is selected, those show up at the top. In the above case the selected color is in table row 3, while  in the picture below below it's in row 10.
Screen Shot 2021-02-08 at 6.55.46 PM.png

TMS

unread,
Feb 8, 2021, 10:16:59 PM2/8/21
to QLab
I think this is kind of close, but I'm not sure how to talk to the field labeled index or value of the ui elements.

tell application id "com.figure53.QLab.4" to tell front workspace
    set userDelay1 to 0.1
    set windowName to q number & " — " & "Light Dashboard"
    set show mode to false
    
    set redsliderlevel to pre wait of cue "Slider Red 1" as number
    set greensliderlevel to pre wait of cue "Slider Green 1" as number
    set bluesliderlevel to pre wait of cue "Slider Blue 1" as number
    
    
    set dashboard visibility of current light dashboard to true
    delay userDelay1

end tell



tell application "System Events" to tell (first application process whose bundle identifier is "com.figure53.QLab.4")
    
    set mysearchterm to "selected.color"
    set listofrows to UI elements in (table 1 of scroll area 2 of splitter group 1 of window windowName) as list
    
    
    repeat with each in listofrows
        set rowindexcounter to UI element index each as integer
        set itemsinthisrow to children of UI element each as list
        repeat with each in itemsinthisrow
            if count (UI elements whose value is mysearchterm) is 1 then
                set therowyouneed to (rowindexcounter +1) -- because the rows index is zero indexed
            end if
           
        end repeat
       
       
    end repeat
end tell

--go back to cue lab and tell it to set values using therowyouneed

micpool

unread,
Feb 9, 2021, 8:30:17 AM2/9/21
to QLab
Something along these lines should work:

set counter to 1
repeat
if (value of static text 1 of UI element 1 of row counter of table 1 of scroll area 2 of splitter group 1 of (first window whose title contains "Dashboard")) is not "selected.color" then
set counter to counter + 1
else
                               -- some code counter = row number of selected color sidebar
                       end if
end repeat
 

Mic

micpool

unread,
Feb 9, 2021, 8:37:48 AM2/9/21
to QLab
I have to say though that developing these sort of  fit every  scenario remotes is going to be a never ending process. What about when you have 2 selected.color rows because you have RGB and CMY fixtures selected?

Mic

TMS

unread,
Feb 9, 2021, 2:53:58 PM2/9/21
to QLab
A fair point, I don't intend to go at this exhaustively. But I would like to be able to find the first occurrence in the table of "selected.color". I pretty sure that will fit my useage 95%+ of the time. Although - now that I have unlimited time on my hands, I suppose one could differentiate based on the names of the individual color sliders?


anywho... here's what worked for me, and is working regardless of how many things I've highlighted in the lighting groups and intruments:


set userDelay1 to 0.1
set searchcounter to ""
set searchterm to "selected.color"


tell application id "com.figure53.QLab.4" to tell front workspace
    
    set windowName to q number & " — " & "Light Dashboard"
    set show mode to false
    
    try

        set redsliderlevel to pre wait of cue "Slider Red 1" as number
        set greensliderlevel to pre wait of cue "Slider Green 1" as number
        set bluesliderlevel to pre wait of cue "Slider Blue 1" as number
        set intensitysliderlevel to pre wait of cue "Slider Intensity 1" as number
-- although I don't have a use for them yet - as long as I've learned to identify the rows I could do other things with more sliders
       set slider5level to pre wait of cue "Slider 5" as number
        set slider6level to pre wait of cue "Slider 6" as number
        set slider7level to pre wait of cue "Slider 7" as number
        set slider8level to pre wait of cue "Slider 8" as number
       
    on error
        display dialog "Something is wrong with your slider cues captain"
    end try

    set dashboard visibility of current light dashboard to true
    delay userDelay1
end tell

tell application "System Events" to tell (first application process whose bundle identifier is "com.figure53.QLab.4")
    
    --find the first selected color area

    
    set listofrows to UI elements in (table 1 of scroll area 2 of splitter group 1 of window windowName) as list
    
    
    repeat with i from 1 to count (items in listofrows)
        try
            if (value of static text 5 of last UI element in row i of table 1 of scroll area 2 of splitter group 1 of window windowName) is "selected.color" then
                set searchcounter to i
                set thetablerowyouwant to i
                tell table 1 of scroll area 2 of splitter group 1 of window windowName
                   
                    try
                        set value of value indicator 1 of slider 1 of UI element 1 of row thetablerowyouwant to redsliderlevel
                        --    display dialog "Red" & redsliderlevel
                    end try
                   
                    try
                        set value of value indicator 1 of slider 2 of UI element 1 of row thetablerowyouwant to greensliderlevel
                        --    display dialog "Green" & greensliderlevel
                    end try
                   
                    try
                        set value of value indicator 1 of slider 3 of UI element 1 of row thetablerowyouwant to bluesliderlevel
                        --display dialog "Blue" & bluesliderlevel
                    end try
                   
                    try
                        set value of value indicator 1 of slider 4 of UI element 1 of row thetablerowyouwant to intensitysliderlevel
                    end try
                end tell
            end if
        end try
       
       
       
    end repeat
    --
    
end tell

Reply all
Reply to author
Forward
0 new messages